Skip to content

Commit

Permalink
Remove xpack actions for vector field
Browse files Browse the repository at this point in the history
We have already decided not to have xpack usage for field mappers
(see elastic#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 elastic#74974).

This removes xpack actions for vector field.

Backport for elastic#75017
  • Loading branch information
mayya-sharipova committed Jul 13, 2021
1 parent 8bc6d7a commit 5760c24
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 222 deletions.
4 changes: 0 additions & 4 deletions docs/reference/rest-api/info.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ Example response:
"available" : true,
"enabled" : true
},
"vectors" : {
"available" : true,
"enabled" : true
},
"voting_only" : {
"available" : true,
"enabled" : true
Expand Down
7 changes: 0 additions & 7 deletions docs/reference/rest-api/usage.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,6 @@ GET /_xpack/usage
"available" : true,
"enabled" : true
},
"vectors" : {
"available" : true,
"enabled" : true,
"dense_vector_fields_count" : 0,
"dense_vector_dims_avg_count" : 0,
"sparse_vector_fields_count" : 0
},
"voting_only" : {
"available" : true,
"enabled" : true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public final class XPackField {
public static final String TRANSFORM = "transform";
/** Name constant for flattened fields. */
public static final String FLATTENED = "flattened";
@Deprecated
/** Name constant for the vectors feature. */
public static final String VECTORS = "vectors";
/** Name constant for the voting-only-node feature. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
import java.io.IOException;
import java.util.Objects;

/**
* @deprecated This class exists for backwards compatibility with 7.14 only
* and should not be used for other purposes.
*/
@Deprecated
public class VectorsFeatureSetUsage extends XPackFeatureSet.Usage {

private final int numDenseVectorFields;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.elasticsearch.index.mapper.Mapper;
import org.elasticsearch.plugins.MapperPlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.xpack.core.XPackPlugin;
import org.elasticsearch.xpack.vectors.mapper.DenseVectorFieldMapper;
import org.elasticsearch.xpack.vectors.mapper.SparseVectorFieldMapper;

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

public Collection<Module> createGuiceModules() {
return Collections.singletonList(b -> {
XPackPlugin.bindFeatureSet(b, VectorsFeatureSet.class);
});
return Collections.emptyList();
}

@Override
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 5760c24

Please sign in to comment.