Package com.yahoo.schema
Class FeatureNames
java.lang.Object
com.yahoo.schema.FeatureNames
Utility methods for query, document and constant rank feature names
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionargumentOf
(String feature) Returns the single argument of the given feature name, without any quotes, or empty if it is not a valid query, attribute or constant feature namestatic com.yahoo.searchlib.rankingexpression.Reference
asAttributeFeature
(String attributeName) static com.yahoo.searchlib.rankingexpression.Reference
asConstantFeature
(String constantName) static com.yahoo.searchlib.rankingexpression.Reference
asQueryFeature
(String propertyName) static boolean
isAttributeFeature
(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if this is an attribute featurestatic boolean
isConstantFeature
(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if this is a constantstatic boolean
isQueryFeature
(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if this is a query featurestatic boolean
isSimpleFeature
(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if the given reference is an attribute, constant or query feature
-
Constructor Details
-
FeatureNames
public FeatureNames()
-
-
Method Details
-
asConstantFeature
public static com.yahoo.searchlib.rankingexpression.Reference asConstantFeature(String constantName) -
asAttributeFeature
public static com.yahoo.searchlib.rankingexpression.Reference asAttributeFeature(String attributeName) -
asQueryFeature
-
isSimpleFeature
public static boolean isSimpleFeature(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if the given reference is an attribute, constant or query feature -
isConstantFeature
public static boolean isConstantFeature(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if this is a constant -
isQueryFeature
public static boolean isQueryFeature(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if this is a query feature -
isAttributeFeature
public static boolean isAttributeFeature(com.yahoo.searchlib.rankingexpression.Reference reference) Returns true if this is an attribute feature -
argumentOf
Returns the single argument of the given feature name, without any quotes, or empty if it is not a valid query, attribute or constant feature name
-