SearchRequest
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Adds a single string query to this search
Adds a single string query to this search
Value parameters
- string
-
the query string
Attributes
Expects a query in json format and sets the query of the search request. i.e. underneath a "query" field if referencing HTTP API Query must be valid json beginning with '{' and ending with '}'. Field names must be double quoted.
Expects a query in json format and sets the query of the search request. i.e. underneath a "query" field if referencing HTTP API Query must be valid json beginning with '{' and ending with '}'. Field names must be double quoted.
Example:
search in "*" limit 5 rawQuery {
"""{ "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } }"""
} searchType SearchType.Scan
Attributes
This method introduces zero or more script field definitions into the search construction
This method introduces zero or more script field definitions into the search construction
Value parameters
- fields
-
zero or more ScriptField instances
Attributes
- Returns
-
this, an instance of SearchRequest
Sets the source of the request as a json string. Note, if you use this method any other body-level settings will be ignored.
Sets the source of the request as a json string. Note, if you use this method any other body-level settings will be ignored.
HTTP query-parameter settings can still be used, eg limit, routing, search type etc.
Unlike rawQuery, source is parsed at the "root" level Query must be valid json beginning with '{' and ending with '}'. Field names must be double quoted.
NOTE: This method only works with the HTTP client.
Example:
search in "*" limit 5 source {
"""{ "query": { "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } } }"""
} searchType SearchType.Scan
Attributes
Adds a new suggestion to the search request, which can be looked up in the response using the name provided.
Adds a new suggestion to the search request, which can be looked up in the response using the name provided.
Attributes
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. If set, the response will have a boolean field terminated_early to indicate whether the query execution has actually terminated early. Defaults to no.
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. If set, the response will have a boolean field terminated_early to indicate whether the query execution has actually terminated early. Defaults to no.
Attributes
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product