Commit graph

781 commits

Author SHA1 Message Date
Mike Pellegrini
c4fc197180
[8.18] [8.x] Mark semantic text as GA in docs (#124670) (#125302)
* [8.x] Mark semantic text as GA in docs (#124670)

* Update docs/changelog/125302.yaml

* Remove extra changelog
2025-03-20 23:51:21 +11:00
John Wagster
d18a665c6a
[DOCS] Opster Migration: Backport of nested bool query addition (#125064) (#125178)
added section related to nested bool queries to provide a more clear example and clean up surrounding language and grammatical issues

Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-03-19 13:11:47 +11:00
Ioana Tagirta
5ad193ce20
Remove references to doc types in percolator docs (#123508) (#123528) 2025-02-27 03:26:30 +11:00
István Zoltán Szabó
4614cb1f59
[DOCS] Documents that deployment_id can be used as inference_id in certain cases. (#121055) (#121059) 2025-01-29 03:28:34 +11:00
Liam Thompson
6e3592ec0a
Update match-phrase-query.asciidoc (#118828) (#121034)
(cherry picked from commit 8e9cccba6a)

Co-authored-by: Damien RENIER <153135842+damien-renier-elastic@users.noreply.github.com>
2025-01-29 01:10:08 +11:00
Liam Thompson
361b4bbcfc
[DOCS] Update wildcard query documentation (#120251) (#120503)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-01-21 20:27:44 +11:00
Carlos Delgado
9362cafcf3
[Docs] kNN vector rescoring for quantized vectors (#118425) (#120407) 2025-01-18 03:30:11 +11:00
George Wallace
0c432ae2cc
Adjustments to match Opster, readability (#119812) (#120032)
* 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 20:17:07 +11:00
Mayya Sharipova
af0b507b90
[DOCS] Interval query max_gaps in all_of rule (#119963) (#119998)
Add more explanation how `max_gaps` work in interval queries with
`all_of` rule.

Closes #113554
2025-01-11 08:26:50 +11:00
Kathleen DeRusso
13c4f5d593
[Docs] Add docs for new semantic text query functionality (#119520) (#119883)
* Update docs with new semantic text functionality

* PR feedback

* PR feedback

* PR Feedback
2025-01-10 03:39:00 +11:00
Benjamin Trent
e5dc17313d
Apply default k for knn query eagerly (#118774) (#119700)
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.

(cherry picked from commit c18b48dbd4)
2025-01-08 09:11:03 +11:00
Jim Ferenczi
17faa89bcc
[8.18] Refactor semantic text field to align with text field behaviour (#119339)
* Refactor semantic text field to align with text field behaviour   (#119183)

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

* fix compil after backport

* fix compil after backport (bis)

---------

Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>
2024-12-30 21:23:19 +11:00
Liam Thompson
b24151a3cd
Add documentation for query rules retriever (#115696) (#116401) 2024-11-07 15:28:50 +01:00
Liam Thompson
7b39d3db52
Term Stats documentation (#115933) (#116167)
* 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>
(cherry picked from commit 0416812456)

Co-authored-by: Aurélien FOUCRET <aurelien.foucret@gmail.com>
2024-11-04 23:28:12 +11:00
Liam Thompson
8135f95869
[DOCS] Add search and filtering tutorial/quickstart, edit filtering page (#114353) (#115738)
(cherry picked from commit 0d8d8bd392)
2024-10-28 21:33:32 +11:00
Liam Thompson
bd8b55cc5b
[DOCS] Add text_expansion deprecation usage note (#115529) (#115537)
(cherry picked from commit 6980fc6253)
2024-10-25 00:39:53 +11:00
Liam Thompson
1883db7f92
Add documentation for minimum_should_match (#113043) (#115530)
(cherry picked from commit 28715b791a)

Co-authored-by: mspielberg <9729801+mspielberg@users.noreply.github.com>
2024-10-25 00:35:31 +11:00
Mike Pellegrini
d4746b50f6
Revert semantic query passage ranking documentation (#113982) (#113984) 2024-10-03 07:44:04 +10:00
Chris Hegarty
45a08b94b3
Upgrade to Lucene 9.12.0 (#113333) (#113835)
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: 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 13:55:02 +01:00
Mike Pellegrini
8ae094fe0e
Add inner hits support to semantic query (#111834) (#113693)
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-28 02:20:11 +10:00
Iraklis Psaroudakis
6f63a4e08b
fix a couple of docs typos (#112901) (#113283)
Co-authored-by: Pm Ching <41728178+pionCham@users.noreply.github.com>
2024-09-21 01:59:14 +10:00
Benjamin Trent
96cc923dcf
Update knn-query.asciidoc (#112833) (#112868) 2024-09-13 21:40:59 +10: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