Commit graph

3210 commits

Author SHA1 Message Date
Benjamin Trent
34f887da9b
Log more information in debug when synonyms fail updates (#102946) (#103020)
Related to: https://github.com/elastic/elasticsearch/issues/102261

In test failures, we are not receiving any information around the bulk
indexing cause stacktrace, just the message. 

This adds debug logging and grabs the first stacktrace over all indices.
Additionally, the logger groups by the failure message in an effort to
find unique failures over all the indices.
2023-12-05 16:48:03 -05:00
Chris Hegarty
9aeb559c9f
Adjust test skip to include 8.11.1 (#102494) (#102497)
Now that #102480 has been merged to 8.11.2, enable the test in this
version.
2023-11-22 13:51:47 -05:00
Chris Hegarty
29988b0902
Fix dense_vector cluster stats indexed_vector_dim_min/max values (#102467) (#102480)
This commit fixes a bug in cluster stats when the dimensions of a dense_vector field type are not yet known - they are set automatically on first indexed doc. The change here is to report a value of -1 for indexed_vector_dim_min and indexed_vector_dim_max for not yet known dims.

Additionally, there is a separate issue with indexed_vector_dim_min, which would previous report 1024 if all vectors had dimensions greater than 1024.

closes #102416
2023-11-22 17:03:50 +00:00
Benjamin Trent
98441955a5
Adjusting bug fix skip for #102164 (#102241) (#102265)
closes: https://github.com/elastic/elasticsearch/issues/102164
2023-11-15 17:09:31 -05:00
Benjamin Trent
a8e9e86d3b
[8.11] Fix incorrect dynamic mapping for non-numeric-value arrays #101965 (#101967) (#101975)
* Fix incorrect dynamic mapping for non-numeric-value arrays #101965 (#101967)

After https://github.com/elastic/elasticsearch/pull/98512 we incorrectly attempt to map an array of any single value type to dense_vector.

Instead, we should validate that ALL mappers are numeric and that ALL of them are `float`.

closes: https://github.com/elastic/elasticsearch/issues/101965

* Update rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/60_dense_vector_dynamic_mapping.yml
2023-11-09 14:29:50 -05:00
Benjamin Trent
7fb28b07af
Disable weight_matches when kNN query is present (#101713) (#101715)
8.10 added a new flag called `weight_matches` and we use it by default when highlighting. However, every hybrid search with kNN will fail with cryptic errors. 

This PR disables weight_matches mode when kNN queries are present.
Supporting weigh_matches & kNN will take more work.

closes: https://github.com/elastic/elasticsearch/issues/101667
2023-11-02 11:56:54 -04:00
Lorenzo Dematté
c1df8645e1
Backport of mute #100954 (#101470) 2023-10-27 11:19:34 -04:00
Benjamin Trent
417091d630
Removing trace logging for issue #100502 (#101404) (#101408)
Test hasn't failed for over a week, the original issue seems resolved as
the at least one of the tests were failing once a day.

closes https://github.com/elastic/elasticsearch/issues/100502

(cherry picked from commit 3b0b48427c)
2023-10-26 17:26:31 -04:00
Martijn van Groningen
208ad5d9c6
[8.11] Fix painless execute api and tsdb issue. (#101212) (#101216)
* Fix painless execute api and tsdb issue. (#101212)

Today using painless execute api with tsdb index can fail with a `_id must be unset or set to [cn4exTOUtxytuLkQAAABeRnR_mY] but was [_id] because [test_index] is in time_series mode` error.
This change addresses this.

The painless execute api shouldn't set use a static _id, but
let the TsidExtractingIdFieldMapper generate it.
Otherwise validation TsidExtractingIdFieldMapper fails.

Closes #101072

* update skip version
2023-10-23 12:33:21 -04:00
Kostas Krikellas
b875ea0c18
Skip tsdb delete test for unsupported versions (#101124) (#101127)
Yet another test affected by the fix for showing the synthetic source,
#98808. This can trigger an assert in older versions as the mapping they
produce (without synthetic source) doesn't match the one they may get
from the master, if the latter is in version 8.10+.

Fixes #101121
2023-10-19 08:39:23 -04:00
Benjamin Trent
809720f9f2
Ensure mappings are fully updated before reading for all 60_dense_vector_dynamic_mapping (#101086) (#101087)
other tests rely on getting the mapping and dynamically updated it, not
just ones creating for vectors (specifically there are dynamic `float`
mappings in this yaml test suite too).
2023-10-18 16:58:55 -04:00
Benjamin Trent
665b6805cd
Add cluster health check to tests & refactor DenseVectorFieldMapper (#101006) (#101076)
I noticed that sometimes we read from the `fieldType()` and other times
we read from the mapper directly. It seems to me that we should only
ever read and update values from one of those, for sanity's sake. 

So, I removed all values that were part of the mapper directly and used
`fieldType().<value>` everywhere.

Additionally, David Turner suggested that we wait for cluster health
before verifying mappings in the yaml tests, so I added that as well.

related to: https://github.com/elastic/elasticsearch/issues/100502
2023-10-18 13:06:06 -04:00
Kostas Krikellas
71e3bc7cc6
[TEST] Assert that both time-series indexes are created (#100885) (#100896)
* Assert that both time-series indexes are created

* Exclude from 8.7-8.10 mixedClusterTests

* Restore asserts

* Fix assert
2023-10-16 08:04:54 -04:00
Benjamin Trent
23280ee6b5
Updating testing and logging for dense_vector dynamic dims (#100546) (#100833)
This adds a test for dynamic dims update mapping merges.

Also, this adds logging to help investigate a periodically failing test.

related to: https://github.com/elastic/elasticsearch/issues/100502
2023-10-13 09:53:21 -04:00
Kostas Krikellas
f40f918765
Restore version skipping for position fields (#100817) (#100823)
* Don't print synthetic source in mapping for bwc tests

* Move comment.

* Don't print synthetic source in mapping for bwc tests #2

* Don't print synthetic source in mapping for bwc tests #2

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 034262c5d2.

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 44e815635e.

* Revert "Don't print synthetic source in mapping for bwc tests (#100572)"

This reverts commit 9322ab9b91.

* Exclude synthetic source test from mixedClusterTests

* Update comment.

* Mute all tsdb tests in mixedClusterTests

This is an interim step to stop sporadic test failures, while we try to
fix version skip for mixed cluster tests.

* Remove old exclusion

* Add aggregations too

* Mute tests for versions between 8.7-8.10

* Remove mute

* Restore version skipping for position fields

* Restore version skip for synthetic source
2023-10-13 08:26:56 -04:00
Kostas Krikellas
79f05fab06
[TEST] Mute all tsdb tests in mixedClusterTests, for versions 8.7 - 8.10 (#100805) (#100814)
* Don't print synthetic source in mapping for bwc tests

* Move comment.

* Don't print synthetic source in mapping for bwc tests #2

* Don't print synthetic source in mapping for bwc tests #2

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 034262c5d2.

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 44e815635e.

* Revert "Don't print synthetic source in mapping for bwc tests (#100572)"

This reverts commit 9322ab9b91.

* Exclude synthetic source test from mixedClusterTests

* Update comment.

* Mute all tsdb tests in mixedClusterTests

This is an interim step to stop sporadic test failures, while we try to
fix version skip for mixed cluster tests.

* Remove old exclusion

* Add aggregations too

* Mute tests for versions between 8.7-8.10

* Remove mute
2023-10-13 06:53:06 -04:00
David Kyle
a2e3c5bdfe
Update doc links for the inference API (#100690) (#100743) 2023-10-12 03:25:21 -04:00
Bogdan Pintea
55b9617208
Switch visibility to public in ESQL REST spec (#100622) (#100628)
This update the visibility field in ESQL's REST spec to public.

It also updates the types of quotes used for one the REST object
parameter to backticks, for consistency.
2023-10-10 14:28:03 -04:00
Panagiotis Bailis
a3d9e72811
Fixing exists query REST tests for sparse_vector_fields (#100030) (#100397)
Removing (incorrectly) expected exceptions for `exists` queries `sparse_vectors`  in  < 8.0.0 versions.

Closes https://github.com/elastic/elasticsearch/issues/100003
2023-10-06 08:57:29 -04:00
Andrei Dan
839afdc331
Promote the Data stream lifecycle feature to Technical Preview (#100187)
This releases the Data stream lifecycle feature as a
Technical Preview feature.

Data stream lifecycle, albeit in technical preview, will allow data streams
to take advantage of a native simplified and resilient lifecycle implementation.
2023-10-03 17:12:35 +01:00
Luca Cavanna
689a1e490a Merge branch 'main' into lucene_snapshot_9_8 2023-10-02 13:56:12 +02:00
Benjamin Trent
92cea2797e
Add nested support for dense_vector fields and knn search (#99763)
* Nested dense_vector support

* Adjust nested support based on new lucene version

* fixing after rebase

* fixing some code

* fixing tests adding transport version

* spotless

* [Automated] Update Lucene snapshot to 9.9.0-snapshot-b3e67403aaf

* Adds new max_inner_product vector similarity function (#99527)

Adds new max_inner_product vector similarity function. This differs from dot_product in the following ways:

Doesn't require vectors to be normalized
Scales the similarity between vectors differently to prevent negative scores

* requiring top level filter to be parent filter

* adding docs & fixing tests

* adding and fixing docs

* adding changlog

* removing unnecessary file changes

* removing unused imports

* fixing test

* maybe fix doc tests

* continue tests in docs

* fixing more tests

* fixing tests

---------

Co-authored-by: Jim Ferenczi <jim.ferenczi@elastic.co>
Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2023-09-28 11:38:04 -04:00
Panagiotis Bailis
075e7c68bd
Muting failing test MixedClusterClientYamlTestSuiteIT test {p0=search.vectors/90_sparse_vector/Sparse vector in 7.x} (#100009) 2023-09-28 13:23:53 +03:00
Luca Cavanna
15c87b681c Merge branch 'main' into lucene_snapshot_9_8 2023-09-28 12:19:14 +02:00
Panagiotis Bailis
e7fa8e8d1d
Support exists queries for sparse_vector fields (#99775)
This commit adds non-null `sparse_vector` fields to `_field_names`, so that we can support `exists` queries & also introduces a new IndexVersion to ensure backwards compatibility. 

Closes #99319
2023-09-28 10:31:18 +03:00
Francisco Fernández Castaño
ae743e673d
Skip settings validation during desired nodes updates (#99946)
This commit skips settings validation during desired nodes updates.
The issue comes when a setting that needs to be validated depends
on a secure setting that cannot be read while the desired nodes are
updated. To avoid such issues, we'll skip the settings validations
completely.

Closes #96127
2023-09-27 16:51:04 +02:00
Luca Cavanna
b3e769987d Merge branch 'main' into lucene_snapshot_9_8 2023-09-22 13:11:10 +02:00
Mary Gouseti
dc8d84d2d5
Apply mixed tests after Data Stream Lifecycle went GA (#99795) 2023-09-22 10:51:24 +03:00
Mayya Sharipova
ddf17e6be5
Increase the max vector dims to 4096 (#99682) 2023-09-20 15:43:40 -04:00
Benjamin Trent
dee85de61c Adds new max_inner_product vector similarity function (#99527)
Adds new max_inner_product vector similarity function. This differs from dot_product in the following ways:

Doesn't require vectors to be normalized
Scales the similarity between vectors differently to prevent negative scores
2023-09-20 20:51:46 +02:00
Luca Cavanna
270de88ea0 Merge branch 'main' into lucene_snapshot_9_8 2023-09-20 20:41:55 +02:00
Quentin Pradet
7f4b9bbe8a
[DOCS] Stop linking to indices.templates.html page (#99618) 2023-09-19 16:28:43 +04:00
elasticsearchmachine
1fe6ca0a4b Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-09-18 10:06:35 +00:00
Andrei Dan
8768277112
DSL Disable yaml tests for <8.11 as the parser was not enabled (#99621) 2023-09-18 10:30:36 +01:00
elasticsearchmachine
daaafffe1e Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-09-14 10:05:48 +00:00
Mark Vieira
7be3d2c191
Increase flexibility of test cluster execution environments (#99437) 2023-09-13 11:18:40 -07:00
Luca Cavanna
b815a47e26 Merge branch 'main' into lucene_snapshot 2023-09-13 14:51:01 +02:00
eyalkoren
af895549cd
Fix composable templates with subobjects: false (#97317) 2023-09-13 14:25:13 +03:00
David Kyle
abee4d3ea8
Inference API (#99224)
Adds the _inference API for managing inference models and performing inference.

Inference is a new plugin in XPack that creates a new system index (.inference)
for storing the model configurations. Models configurations are managed with 
the standard PUT, GET, DELETE requests and POST to perform inference.
This PR creates an inference service for  deploying and inferring on the 
ELSER model.
2023-09-12 21:52:34 +01:00
elasticsearchmachine
3d186fda96 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-09-12 10:05:06 +00:00
Benjamin Trent
83b70e37ef
Revert "Auto-normalize dot_product vectors at index & query (#98944)" (#99421)
This reverts commit 7b9c367aeb.
2023-09-11 09:33:17 -04:00
elasticsearchmachine
00299dd417 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-09-09 10:04:18 +00:00
Carlos Delgado
648d30ba2a
Fix sparse vector tests (#99339)
* Fix sparse vector error so it can catch errors thrown before 8.11
2023-09-08 16:15:07 +02:00
elasticsearchmachine
7026d0711c Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-09-08 10:07:26 +00:00
David Turner
a40b61a0d8 Mute YAML test for #99318 2023-09-08 08:58:23 +01:00
elasticsearchmachine
2bcf075403 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-09-07 10:05:13 +00:00
Kathleen DeRusso
258d0cb0be
Automatically map floats as dense vector (#98512) 2023-09-06 16:06:29 -04:00
Carlos Delgado
ae50c13ec7
Fix sparse_vector tests for serverlesss (#99241) 2023-09-06 18:01:40 +02:00
Adrien Grand
fe2dd4e0ba Merge branch 'main' into lucene_snapshot 2023-09-06 13:29:57 +02:00
Carlos Delgado
6bbf6c2aaf
Bring back sparse_vector mapping (#98996)
Adds back `sparse_vector` field type, as a copy of `rank_features`. 

The main goal is to have the `sparse_vector` field type available so we
can switch ELSER queries to use the new type.
2023-09-06 05:27:14 -04:00