Skip to content

Conversation

@jtibshirani
Copy link
Contributor

Follow up to #48368. This PR removes support for sparse_vector on new
indices. On 7.x indices a sparse_vector can still be defined, but it is not
possible to index or search on it.

@jtibshirani jtibshirani added >breaking :Search/Search Search-related issues that do not fall into other categories v8.0.0 labels Oct 31, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@jtibshirani jtibshirani force-pushed the remove-sparse-vector branch 3 times, most recently from 630e4e3 to 3e83ba5 Compare November 1, 2019 19:42
@jtibshirani jtibshirani force-pushed the remove-sparse-vector branch 2 times, most recently from a300dcb to 7e30732 Compare November 3, 2019 17:28
@jtibshirani
Copy link
Contributor Author

@mayya-sharipova this is now ready for a review (after some initial issues with test failures).

@jtibshirani
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-sample-matrix

Copy link
Contributor

@mayya-sharipova mayya-sharipova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtibshirani Thanks Julie, very nice approach for the bwc to keep just a definition of the type.

* @deprecated The sparse_vector type was deprecated in 7.x and removed in 8.0. This mapper
* definition only exists so that 7.x indices can be read without error.
*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be add TODO: to remove this class in 9.0

assertThat(e.getCause(), instanceOf(IllegalArgumentException.class));
assertThat(e.getCause().getMessage(), containsString(
"dimension number must be a non-negative integer value not exceeding [65535], got [-50]"));
public void testSparseVectorWith7xIndex() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely written test!

@jtibshirani jtibshirani merged commit 460d545 into elastic:master Nov 14, 2019
@jtibshirani jtibshirani deleted the remove-sparse-vector branch November 14, 2019 21:54
masseyke added a commit that referenced this pull request Sep 7, 2021
The sparse_vector type is deprecated and has been removed in 8.0. This commit adds a deprecation info API
message if we detect templates with mappings that include sparse_vector fields.
Relates #42404 #48781
@jtibshirani jtibshirani added :Search Relevance/Vectors Vector search and removed :Search/Search Search-related issues that do not fall into other categories labels Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants