Skip to content

Commit 29048de

Browse files
Remove xpack actions for vector field (#75302)
We have already decided not to have xpack usage for field mappers (see #53076). As mappings stats of all fields is already tracked in cluster stats. Moreover xpack usage for vector field is a quite expensive operation (see #74974). This removes xpack actions for vector field. Backport for #75017
1 parent b177929 commit 29048de

File tree

8 files changed

+7
-222
lines changed

8 files changed

+7
-222
lines changed

docs/reference/rest-api/info.asciidoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ Example response:
146146
"available" : true,
147147
"enabled" : true
148148
},
149-
"vectors" : {
150-
"available" : true,
151-
"enabled" : true
152-
},
153149
"voting_only" : {
154150
"available" : true,
155151
"enabled" : true

docs/reference/rest-api/usage.asciidoc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,6 @@ GET /_xpack/usage
276276
"available" : true,
277277
"enabled" : true
278278
},
279-
"vectors" : {
280-
"available" : true,
281-
"enabled" : true,
282-
"dense_vector_fields_count" : 0,
283-
"dense_vector_dims_avg_count" : 0,
284-
"sparse_vector_fields_count" : 0
285-
},
286279
"voting_only" : {
287280
"available" : true,
288281
"enabled" : true

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackField.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public final class XPackField {
4444
public static final String TRANSFORM = "transform";
4545
/** Name constant for flattened fields. */
4646
public static final String FLATTENED = "flattened";
47+
@Deprecated
4748
/** Name constant for the vectors feature. */
4849
public static final String VECTORS = "vectors";
4950
/** Name constant for the voting-only-node feature. */

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/vectors/VectorsFeatureSetUsage.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
import java.io.IOException;
1818
import java.util.Objects;
1919

20+
/**
21+
* @deprecated This class exists for backwards compatibility with 7.14 only
22+
* and should not be used for other purposes.
23+
*/
24+
@Deprecated
2025
public class VectorsFeatureSetUsage extends XPackFeatureSet.Usage {
2126

2227
private final int numDenseVectorFields;

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/vectors/50_vector_stats.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

x-pack/plugin/vectors/src/main/java/org/elasticsearch/xpack/vectors/Vectors.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.elasticsearch.index.mapper.Mapper;
1212
import org.elasticsearch.plugins.MapperPlugin;
1313
import org.elasticsearch.plugins.Plugin;
14-
import org.elasticsearch.xpack.core.XPackPlugin;
1514
import org.elasticsearch.xpack.vectors.mapper.DenseVectorFieldMapper;
1615
import org.elasticsearch.xpack.vectors.mapper.SparseVectorFieldMapper;
1716

@@ -27,9 +26,7 @@ public class Vectors extends Plugin implements MapperPlugin {
2726
public Vectors() { }
2827

2928
public Collection<Module> createGuiceModules() {
30-
return Collections.singletonList(b -> {
31-
XPackPlugin.bindFeatureSet(b, VectorsFeatureSet.class);
32-
});
29+
return Collections.emptyList();
3330
}
3431

3532
@Override

x-pack/plugin/vectors/src/main/java/org/elasticsearch/xpack/vectors/VectorsFeatureSet.java

Lines changed: 0 additions & 86 deletions
This file was deleted.

x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/VectorsFeatureSetTests.java

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)