diff options
author | Jon Bratseth <bratseth@vespa.ai> | 2023-06-12 15:14:11 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@vespa.ai> | 2023-06-12 15:14:11 +0200 |
commit | 2092f374fc4f3de42da75f4660849af0f00f7a81 (patch) | |
tree | 1047036d19f30481925ab38b0601a85000121ad3 /container-search/src/main/java/com/yahoo/search/schema/FieldInfo.java | |
parent | 537d80f3aad6351322ded0f3e300722cbcdba5d7 (diff) |
Move to SchemaInfo
Add the missing constructs to SchemaInfo to be able to use
it in place of IndexFacts for validation, and rewrite QueryValidator
to use it. The new validation (for prefix search on indexes) is disabled
until this is verified, so this should be a no-op.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/schema/FieldInfo.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/schema/FieldInfo.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/schema/FieldInfo.java b/container-search/src/main/java/com/yahoo/search/schema/FieldInfo.java new file mode 100644 index 00000000000..c3f6f22f1b9 --- /dev/null +++ b/container-search/src/main/java/com/yahoo/search/schema/FieldInfo.java @@ -0,0 +1,27 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.search.schema; + +import com.yahoo.api.annotations.Beta; + +import java.util.Set; + +/** + * Information about a field or field set. + * + * @author bratseth + */ +@Beta +public interface FieldInfo { + + /** Returns the name of this field or field set. */ + String name(); + + Field.Type type(); + + /** Returns whether this field or field set is attribute(s), i.e. does indexing: attribute. */ + boolean isAttribute(); + + /** Returns whether this field is index(es), i.e. does indexing: index. */ + boolean isIndex(); + +} |