Commit Graph

593 Commits

Author SHA1 Message Date
markharwood 29a13007e4 [DOCS] Add TermVectors API reference to MLT query docs (#37228)
Adds a reference the use of the TermVectors API following an issue raised about lack of flexibility in the MLT query: https://github.com/elastic/elasticsearch/issues/35509
2019-10-18 10:02:19 -04:00
Anton 88346ff8a5 [DOCS] Fix typo in intervals query docs (#48180) 2019-10-17 09:15:21 -04:00
David Woods 8142ac4d5e Add a note to query_string docs around spaces in field names. (#47326) 2019-10-16 13:25:48 -07:00
Alan Woodward 566e1b7d33
Remove type field from DocWriteRequest and associated Response objects (#47671)
This commit removes the type field from index, update and delete requests, and their
associated responses.

Relates to #41059
2019-10-11 10:23:55 +01:00
Ryan Ernst d8b4556e2d
Add explanations to script score queries (#46693)
While function scores using scripts do allow explanations, they are only
creatable with an expert plugin. This commit improves the situation for
the newer script score query by adding the ability to set the
explanation from the script itself.

To set the explanation, a user would check for `explanation != null` to
indicate an explanation is needed, and then call
`explanation.set("some description")`.
2019-10-03 19:35:59 -07:00
James Rodewig eb454558fb [DOCS] Correct snippet in query string syntax 2019-09-30 11:25:13 -04:00
Andrew Naguib b4506019d5 [DOCS] Note double backslashes (`\\`) are required to escape JSON chars (#46863) 2019-09-30 11:19:50 -04:00
James Rodewig 07761530c1
[DOCS] Add multi-level nested query example to nested query docs (#46986) 2019-09-25 00:56:15 -04:00
Alan Woodward c1f99e2d75
Remove `_type` from SearchHit (#46942)
This commit removes the `_type` field from all search hit responses.

Relates to #41059
2019-09-23 19:14:54 +01:00
rikardbakkehaug 212e3e4075 [DOCS] Correct date math ex for `gt` and `gte` parms in `range` query docs (#46873) 2019-09-19 16:38:42 -04:00
James Rodewig 5c78f606c2
[DOCS] Change // CONSOLE comments to [source,console] (#46440) 2019-09-09 10:45:37 -04:00
Suhel Khan 47478921ac [Docs] Fix typo in minimum-should-match.asciidoc (#46472) 2019-09-09 14:17:49 +02:00
James Rodewig e43be90e6c
[DOCS] [5 of 5] Change // TESTRESPONSE comments to [source,console-results] (#46449) 2019-09-06 14:05:36 -04:00
James Rodewig 466c59a4a7
[DOCS] Replace "// TESTRESPONSE" magic comments with "[source,console-result] (#46295) 2019-09-05 16:47:18 -04:00
James Rodewig 95655162f3
[DOCS] Reformat match query (#45152) 2019-08-22 15:29:14 -04:00
markharwood f0dbc68187
Search enhancement: pinned queries (#44345)
Search enhancement: - new query type allows selected documents to be promoted above any "organic” search results.
This is the first feature in a new module `search-business-rules` which will house licensed (non OSS) logic for rewriting queries according to business rules.
The PinnedQueryBuilder class offers a new `pinned` query in the DSL that takes an array of promoted IDs and an “organic” query and ensures the documents with the promoted IDs rank higher than the organic matches.

Closes #44074
2019-08-16 14:46:06 +01:00
James Rodewig 9c488f3ea1
[DOCS] Rewrite `fuzzy` query docs (#42078) 2019-08-14 13:06:23 -04:00
James Rodewig c4bc45fca3
[DOCS] Reformat query string query (#45296) 2019-08-12 11:17:19 -04:00
James Rodewig af70fb9288
[DOCS] Reformats interval query (#45350) 2019-08-09 08:53:25 -04:00
James Rodewig bf0ac30b79
[DOCS] Reformats simple query string query (#45343) 2019-08-09 08:32:46 -04:00
Nick Knize c89b66afcb
[SPATIAL] New ShapeQueryBuilder for querying indexed cartesian geometry (#45108)
This commit adds a new ShapeQueryBuilder to the xpack spatial module for
querying arbitrary Cartesian geometries indexed using the new shape field
type.

The query builder extends AbstractGeometryQueryBuilder and leverages the
ShapeQueryProcessor added in the previous field mapper commit.

Tests are provided in ShapeQueryTests in the same manner as
GeoShapeQueryTests and docs are updated to explain how the query works.
2019-08-08 15:28:35 -05:00
James Rodewig 1cc4aa176f
[DOCS] Reformat match phrase prefix query (#45209) 2019-08-06 14:01:49 -04:00
James Rodewig 08ea6a79fb
[DOCS] Update relevance score cross-references (#45092) 2019-08-02 14:15:12 -04:00
James Rodewig e1fe213d8f
[DOCS] Reformat script score query (#45087) 2019-08-01 12:06:34 -04:00
James Rodewig d9b2d8d9cf
[DOCS] Reformat rank feature query. Add relevance score section. (#44975) 2019-07-31 14:31:28 -04:00
James Rodewig f167b2f909
[DOCS] Update parameter format (#44703) 2019-07-31 14:18:22 -04:00
James Rodewig 3be9a3bd2c
[DOCS] Reformat script query (#44882) 2019-07-29 09:59:09 -04:00
James Rodewig a5df840c24
[DOCS] Rewrite `prefix` query docs (#41955) 2019-07-29 08:37:01 -04:00
James Rodewig 45be90954e
[DOCS] Reformat distance feature query (#44916) 2019-07-29 08:34:50 -04:00
James Rodewig 8b2493ca9f
[DOCS] Rewrite `regexp` query (#42711) 2019-07-24 08:37:37 -04:00
James Rodewig 3c92e8eb1a
[DOCS] Reformat `parent_id` query docs (#44449) 2019-07-19 11:03:06 -04:00
James Rodewig f3ddd36d05
[DOCS] Reformat `has_parent` query docs (#44443) 2019-07-19 10:50:36 -04:00
James Rodewig ea1adb61c2
[DOCS] Update anchors and links for Elasticsearch API relocation (#44500) 2019-07-19 09:16:35 -04:00
James Rodewig ec37a9cea0
[DOCS] Make Query DSL titles consistent (#43935) 2019-07-18 10:18:11 -04:00
Mayya Sharipova 16747f811f
Add l1norm and l2norm distances for vectors (#44116)
* Add l1norm and l2norm distances for vectors

Add L1norm - Manhattan distance
Add L2norm - Euclidean distance
relates to #37947

* Address Christoph's feedback

- organize vector functions as a separate doc
- increase precision in tests calculations
- add a separate test when sparse doc dims
are bigger and less than query vector dims

* Made examples more realistic
2019-07-11 14:14:23 -04:00
James Rodewig e04c8464c7
[DOCS] Rewrite `has_child` query to use new format (#44190) 2019-07-11 09:10:39 -04:00
James Rodewig 4ad081b1e7 [DOCS] Correct `ignore_unmapped` parm typo for nested query 2019-07-10 10:08:36 -04:00
James Rodewig 593e1636ab
[DOCS] Rewrite nested query to use new format (#44130) 2019-07-10 08:50:54 -04:00
Mayya Sharipova 5255eb3c77
Forbid empty doc values on vector functions (#43944)
Currently when a document misses a vector value, vector function
returns 0 as a score for this document. We think this is incorrect
behaviour.
With this change, an error will be thrown if vector functions are
used with docs that are missing vector doc values.
Also VectorScriptDocValues is modified to allow size() function,
which can be used to check if a document has a value for the
vector field.
2019-07-05 17:59:13 -04:00
James Rodewig 0753b412cc
[DOCS] Rewrite dis max query (#43586) 2019-07-03 08:55:50 -04:00
Mayya Sharipova 66e1e5643f
Add dims parameter to dense_vector mapping (#43444)
Typically, dense vectors of both documents and queries must have the same
number of dimensions. Different number of dimensions among documents
or query vector indicate an error. This PR enforces that all vectors
for the same field have the same number of dimensions. It also enforces
that query vectors have the same number of dimensions.
2019-07-02 16:21:10 -04:00
James Rodewig b490eab3a5
[DOCS] Rewrite `terms_set` query (#43060) 2019-06-28 12:56:22 -04:00
Alan Woodward 89a3eb3c6f
Wildcard intervals (#43691)
This commit adds a wildcard intervals source, similar to the prefix. It
also changes the term parameter in prefix to read prefix, to bring it
in to line with the pattern parameter in wildcard.

Closes #43198
2019-06-28 13:58:06 +01:00
James Rodewig 623a5ddac0
[DOCS] Rewrite boosting query (#43647) 2019-06-28 08:35:20 -04:00
Alan Woodward a520a5d761
Add prefix intervals source (#43635)
This commit adds a prefix intervals source, allowing you to search
for intervals that contain terms starting with a given prefix. The source
can make use of the index_prefixes mapping option.

Relates to #43198
2019-06-26 15:36:47 +01:00
James Rodewig 5f6321aacb
[DOCS] Rewrite `range` query (#43282) 2019-06-25 15:24:44 -04:00
rbayet 05689de55f
Fixing backquote in fail_on_unsupported_field (#43572) 2019-06-25 16:35:13 +02:00
James Rodewig 086c330923
[DOCS] Rewrite `constant_score` query (#43374) 2019-06-21 12:03:19 -04:00
James Rodewig 97f70c5e27
[DOCS] Rewrite term-level queries overview (#43337) 2019-06-21 11:53:01 -04:00
Christoph Büscher b08ba28c9b
[Docs] Remove boost parameter from intervals-query example (#43331)
The boost factor doesn't seem to be needed and can be removed.
2019-06-20 10:33:48 +02:00