Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

validate

Validate a search


Description

Validate a search

Usage

validate(conn, index, type = NULL, ...)

Arguments

conn

an Elasticsearch connection object, see connect()

index

Index name. Required.

type

Document type. Optional.

...

Additional args passed on to Search()

See Also

Examples

## Not run: 
x <- connect()

if (!index_exists(x, "twitter")) index_create(x, "twitter")
docs_create(x, 'twitter', id=1, body = list(
   "user" = "foobar", 
   "post_date" = "2014-01-03",
   "message" = "trying out Elasticsearch"
 )
)
validate(x, "twitter", q='user:foobar')
validate(x, "twitter", q='user:foobar')

body <- '{
"query" : {
  "bool" : {
    "must" : {
      "query_string" : {
        "query" : "*:*"
      }
    },
    "filter" : {
      "term" : { "user" : "kimchy" }
    }
  }
}
}'
validate(x, "twitter", body = body)

## End(Not run)

elastic

General Purpose Interface to 'Elasticsearch'

v1.2.0
MIT + file LICENSE
Authors
Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.