elasticsearch (version 0.1.0)

search: search

Description

Return documents matching a query, aggregations/facets, highlighted snippets, suggestions, and more. search executes a search query and retrieves results making the query

Usage

search(client, ...)
"search"(client, index, type, body, from = 0, size = 10, fields = NULL, source = NULL, default_operator = "OR", explain = FALSE, lowercase_expanded_terms = NULL, preference = "random", analyzer = NULL, analyze_wildcard = FALSE, ignore_unavailable = NULL, timeout = NULL, source_include = NULL, allow_no_indices = FALSE, expand_wildcards = "open", search_type = NULL, source_exclude = NULL, track_scores = NULL, sort = NULL, query_cache = NULL, raw = FALSE, validate_params = TRUE)

Arguments

index
String A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices
type
String A comma-separated list of document types to search; leave empty to perform the operation on all types
body
Json
from
Number Starting offset (default: 0)
size
Number Number of hits to return (default: 10)
fields
String, String[], Logical A comma-separated list of fields to return as part of a hit
source
String, String[], Logical True or false to return the _source field or not, or a list of fields to return
default_operator
String The default operator for query string query (AND or OR)
explain
Logical Specify whether to return detailed information about score computation as part of a hit
lowercase_expanded_terms
Logical Specify whether query terms should be lowercased
preference
String Specify the node or shard the operation should be performed on (default: random)
analyzer
String The analyzer to use for the query string
analyze_wildcard
Logical Specify whether wildcard and prefix queries should be analyzed (default: false)
ignore_unavailable
String Whether specified concrete indices should be ignored when unavailable (missing or closed)
timeout
Number Explicit operation timeout
source_include
String, String[], Logical A list of fields to extract and return from the _source field
allow_no_indices
Logical Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
expand_wildcards
String Whether to expand wildcard expression to concrete indices that are open, closed or both.
search_type
String Search operation type
source_exclude
String, String[], Logical A list of fields to exclude from the returned _source field
track_scores
Logical Whether to calculate and return scores even if they are not used for sorting
sort
String, String[], Logical A list of : pairs
query_cache
Logical Specify if query cache should be used for this request or not, defaults to index level setting
indices_boost
String, String[], Logical Comma-separated list of index boosts
lenient
Logical Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
routing
String, String[], Boolean A comma-separated list of specific routing values
version
Logical Specify whether to return document version as part of a hit

References

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-search.html#search-search

Examples

search("twitter", id="1")
search("twitter", "tweet", "1", 'c("name", "date")')