Commit graph

778 commits

Author SHA1 Message Date
István Zoltán Szabó
7400a14995
[DOCS] Documents that deployment_id can be used as inference_id in certain cases. (#121055) 2025-01-28 17:01:18 +01:00
Liam Thompson
3939198477
Update match-phrase-query.asciidoc (#118828) (#121033)
(cherry picked from commit 8e9cccba6a)

Co-authored-by: Damien RENIER <153135842+damien-renier-elastic@users.noreply.github.com>
2025-01-28 16:19:14 +01:00
Liam Thompson
8b00d503a1
[DOCS] Update wildcard query documentation (#120251) (#120502)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-01-21 20:29:38 +11:00
Carlos Delgado
aea4853069
[Docs] kNN vector rescoring for quantized vectors (#118425) 2025-01-17 17:02:09 +01:00
George Wallace
8ac3c2d371
Adjustments to match Opster, readability (#119812) (#120031)
* Adjustments to match Opster, readability

https://opster.com/guides/elasticsearch/search-apis/elasticsearch-bool-queries/

* Edits



* Spacing



---------

Co-authored-by: Kofi B <23384471+thekofimensah@users.noreply.github.com>
2025-01-13 12:03:59 +01:00
Mayya Sharipova
de0914965f
[DOCS] Interval query max_gaps in all_of rule (#119963)
Add more explanation how `max_gaps` work in interval queries with
`all_of` rule.

Closes #113554
2025-01-11 07:59:32 +11:00
Kathleen DeRusso
c7ec808f45
[Docs] Add docs for new semantic text query functionality (#119520)
* Update docs with new semantic text functionality

* PR feedback

* PR feedback

* PR Feedback
2025-01-09 11:11:20 -05:00
Benjamin Trent
c18b48dbd4
Apply default k for knn query eagerly (#118774)
When originally added, the knn query didn't apply `top-k` restrictions
to the query. Instead it would allow the resulting `num_candidate` to be
combined with sibling queries without restricting to `top-size` results
ahead of time.

This honestly is confusing behavior and leads to some bugs in understand
how it all works.

This commit addresses this by eagerly gathering only `size` results when
`k==null` before combining with other queries. 

To achieve the previous behavior, this can be done directly by setting
`k==num_candidates` in the query.
2025-01-08 07:40:34 +11:00
Jim Ferenczi
12e86b1cd0
Refactor semantic text field to align with text field behaviour (#119183)
Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>
2024-12-30 09:31:02 +01:00
Kathleen DeRusso
14a7b8fe67
Add documentation for query rules retriever (#115696)
* Add initial query rules retriever docs

* Add docs tests

* Apply suggestions from code review

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* PR feedback

* Make query rules guide retriever-first

* Add warning to DSL doc

* Update docs/reference/search/retriever.asciidoc

Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>

* Update docs/reference/search/retriever.asciidoc

Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>

* Apply suggestions from code review

Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>

* Give parameters subheading an explicit id

* Fix formatting

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>
2024-11-06 14:42:06 -05:00
Aurélien FOUCRET
0416812456
Term Stats documentation (#115933)
* Term Stats documentation

* Update docs/reference/reranking/learning-to-rank-model-training.asciidoc

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

* Fix query example.

---------

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2024-10-30 15:31:26 +01:00
Liam Thompson
0d8d8bd392
[DOCS] Add search and filtering tutorial/quickstart, edit filtering page (#114353) 2024-10-28 11:05:44 +01:00
Liam Thompson
6980fc6253
[DOCS] Add text_expansion deprecation usage note (#115529) 2024-10-24 15:11:10 +02:00
mspielberg
28715b791a
Add documentation for minimum_should_match (#113043) 2024-10-24 15:06:39 +02:00
Mike Pellegrini
2f3bf74e6e
Revert semantic query passage ranking documentation (#113982) 2024-10-02 17:15:55 -04:00
Chris Hegarty
32dde26e49
Upgrade to Lucene 9.12.0 (#113333)
This commit upgrades to Lucene 9.12.0.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
Co-authored-by: Armin Braun <me@obrown.io>
Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
Co-authored-by: Chris Hegarty <chegar999@gmail.com>
Co-authored-by: John Wagster <john.wagster@elastic.co>
Co-authored-by: Luca Cavanna <javanna@apache.org>
Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
2024-10-01 08:39:27 +01:00
Mike Pellegrini
8344d3a6ac
Add inner hits support to semantic query (#111834)
Adds inner hits support to the semantic query through a restricted inner_hits parameter, which exposes from and size from the inner_hits options
2024-09-27 10:51:11 -04:00
Pm Ching
d68f2fa4a6
fix a couple of docs typos (#112901) 2024-09-20 18:34:24 +03:00
Benjamin Trent
4e0b197f30
Update knn-query.asciidoc (#112833) 2024-09-13 13:15:44 +02:00
Jim Ferenczi
6ee9801a99
Update the intervals query docs (#111808)
Since https://github.com/apache/lucene-solr/pull/620, intervals disjunctions are automatically rewritten to handle cases where minimizations can miss valid matches.
This change updates the documentation to take this behaviour into account (users don't need to manually pull intervals disjunctions to the top anymore).
2024-08-13 13:39:55 +09:00
Kathleen DeRusso
02c494963a
[Query rules] Add exclude query rule type (#111420)
* Cleanup: Remove pinned IDs from applied rules in favor of single applied docs

* Add support for query rules of type exclude, to exclude specified documents from result sets

* Support exluded documents that specify the _index as well as the _id

* Cleanup

* Update docs/changelog/111420.yaml

* Update docs

* Spotless

* PR feedback - docs updates

* Apply PR feedback

* PR feedback

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-02 08:03:54 -04:00
Mayya Sharipova
7de305c4ec
Remove 4096 bool query max limit from docs (#111421)
indices.query.bool.max_clause_count is set automatically and does
not default to 4096 as before. This remove mentions of 4096
from query documentations.

Relates to PR#91811
2024-07-29 15:20:39 -04:00
István Zoltán Szabó
1a5b008921
[DOCS] Clarifies semantic query behavior on sparse and dense vector fields (#111339)
* [DOCS] Clarifies semantic query behavior on sparse and dense vector fields.

* [DOCS] Adds a NOTE to the semantic query docs.
2024-07-26 16:53:38 +02:00
Carlos Delgado
f29b92cb07
Group vector queries into new section (#110722) 2024-07-11 14:45:35 +02:00
Kathleen DeRusso
7a1d532ffb
Pass over Sparse Vector docs for correctness (#110282)
* Remove legacy mentions of text expansion queries

* Add missing query_vector param to sparse_vector query docs

* Fix formatting errors in sparse vector query dsl doc

* Remove unnecessary test setup block
2024-07-02 13:37:25 -04:00
Mike Pellegrini
d288dbf94e
Fix Semantic Query Parameter Formatting (#110355) 2024-07-02 08:07:35 -04:00
Mayya Sharipova
405e39660b
Support k parameter for knn query (#110233)
Introduce an optional k param for knn query

If k is not set, knn query has the previous behaviour:
- `num_candidates` docs  is collected from each shard. This `num_candidates` docs
are used for combining with results with other queries and aggregations on each shard.
- docs from all shards are merged to produce the top global `size` results

If k is set, the behaviour instead is following:
- `k` docs is collected from each shard. This `k` docs are used for
combining results with other queries and aggregations on each shard.
- similarly, docs from all shards are merged to produce the top global `size`
results.

Having `k` param makes it more intuitive for users to address their needs.
They also don't need to care and can skip `num_candidates` param for this query
as it is of more internal details to tune how knn search operates.

Closes #108473
2024-06-28 09:59:28 -04:00
Kathleen DeRusso
19fc0d9cad
Deprecate text_expansion and weighted_tokens queries (#109880) 2024-06-27 13:24:57 -04:00
Kathleen DeRusso
41a61b069b
Mark Query Rules as GA (#110004)
* Mark query rules APIs as stable

* Remove preview label from docs

* Update docs/changelog/110004.yaml
2024-06-21 15:26:51 -04:00
Carlos Delgado
4d3f9f2fb9
Fix RRF example for semantic query (#109516)
Follow up to https://github.com/elastic/elasticsearch/pull/109433, fix
appropriately this time the semantic query example with RRF.
2024-06-10 17:59:13 +10:00
Carlos Delgado
d4d5d9320c
Fix semantic_text retrievers docs example (#109433) 2024-06-06 16:31:12 +02:00
István Zoltán Szabó
95ce898436
[DOCS] Adds docs to semantic text (#108311)
Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>
Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>
Co-authored-by: Kathleen DeRusso <kathleen.derusso@elastic.co>
2024-05-31 16:56:07 +02:00
István Zoltán Szabó
1e58f3a485
[DOCS] Fixes sparse vector query docs. (#109153) 2024-05-29 14:56:59 +02:00
Kathleen DeRusso
7f35f1bed0
Add sparse_vector query (#108254)
---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
2024-05-22 17:06:57 -04:00
Kathleen DeRusso
74d7010a8f
Rename rule query and add support for multiple rulesets (#108831) 2024-05-22 15:20:34 -04:00
Kathleen DeRusso
a809641179
Fix typo in text_expansion query docs example (#107572)
* Fix typo in docs example

* fix indentation
2024-04-17 14:40:53 -04:00
Liam Thompson
33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* Remove `es-test-dir` book-scoped variable

* Remove `plugins-examples-dir` book-scoped variable

* Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables

- In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed.
- In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path
- In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem

* Replace `es-repo-dir` with `es-ref-dir`

* Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
2024-04-17 14:37:07 +02:00
Tommaso Teofili
7bff3b3bec
Add modelId and modelText to KnnVectorQueryBuilder (#106068)
* Add modelId and modelText to KnnVectorQueryBuilder

Use QueryVectorBuilder within KnnVectorQueryBuilder to make it
possible to perform knn queries also when a query vector is not
immediately available. Supplying a text_embedding query_vector_builder
with model_text and model_id instead of the query_vector will result
in the generation of a query_vector by calling inference on the
specified model_id with the supplied model_text (during query
rewrite). This is consistent with the way query vectors are built
from model_id / model_text in KnnSearchBuilder (DFS phase).
2024-03-18 16:13:38 +01:00
Panagiotis Bailis
d471ccb5bb
Adding support for hex-encoded byte vectors on knn-search (#105393) 2024-03-13 09:24:51 +02:00
Kathleen DeRusso
bef6363649
Fix typo in text_expansion example (#106265) 2024-03-12 15:19:21 -04:00
Jack Conradson
68b0acac8f
Add retrievers using the parser-only approach (#105470)
This enhancement adds a new abstraction to the _search API called "retriever." A 
retriever is something that returns top hits. This adds three initial retrievers called
"standard", "knn", and "rrf". The retrievers use a parser-only approach where they
are parsed and then translated into a SearchSourceBuilder to execute the actual
search.
---------

Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
2024-03-12 10:11:55 -07:00
Panagiotis Bailis
7ce8d76559
Making k and num_candidates optional for knn search (#101209) 2024-02-01 15:43:09 +02:00
Mayya Sharipova
669d4ae9b9
Add hybrid search to knn query documentation (#104562)
Relates to PR #98916
Closes elastic/search-docs-team#39
2024-01-18 15:53:48 -05:00
Kathleen DeRusso
0570b0baaa
Update text expansion/weighted tokens documentation make examples consistent with clients (#103663)
* Update text expansion docs and clarify int/float for token pruning config

* Fix formatting

* Fix tests

* Fix tests
2024-01-02 14:21:45 -05:00
Daniel Mitterdorfer
26115fc151
Exists query also works with only doc_values (#103647)
With this commit we amend the docs for the `exists` query to clarify
that it works with either `index` *or* `doc_values` set to `true` in the
mapping. Only if both are disabled, the `exists` query won't work.
2023-12-21 16:33:42 +01:00
Mayya Sharipova
d6c53e03d2
Improve span queries documentation (#103490)
Improvement includes:
1. Remove reference to Lucene queries (this information is not necessary
for Elastic users, and can be outdated)
2. For `span_field_masking` include a node to use
"require_field_match" : false parameter for highlighters to work.

Closes #101804
2023-12-19 14:51:19 -05:00
Kathleen DeRusso
3520584aac
Add optional pruning config (weighted terms scoring) to text expansion query (#102862)
Co-authored-by: Jim Ferenczi <jim.ferenczi@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-12-13 14:53:13 -05:00
Mayya Sharipova
b014843078
Return matched_queries in Percolator (#103084)
Return matched_queries for named queries in Percolator.

In a response, each hit together with
a `_percolator_document_slot` field will contain
`_percolator_document_slot_<slotNumber>_matched_queries` fields that will show
which sub-queries matched each percolated document.

Closes #10163
2023-12-11 09:07:26 -05:00
Kathleen DeRusso
4dd9e2a772
[Query Rules] Add some usability clarifications to docs (#102990)
* [Query Rules] Add some usability clarifications to docs

* Fix typo
2023-12-06 17:16:56 -05:00
Riahiamirreza
f99b4459d7
Remove redundant character in mlt-query.asciidoc (#102945) 2023-12-04 14:44:12 -06:00