Class SolrFieldHelper
java.lang.Object
org.ametys.cms.content.indexing.solr.SolrFieldHelper
Helper for getting Solr field names.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getFieldSuffix
(MetadataType type) Get a field suffix from its type.static String
getFieldSuffix
(MetadataType type, String language, boolean fullText) Get a field suffix from its type.static String
getFulltextFieldSuffix
(String language) Get the wildcard field suffixstatic String
getIndexingFieldName
(MetadataType type, String fieldPath) Get the Solr field name (without analyzing)static String
getIndexingFieldName
(MetadataType type, String fieldPath, String language) Get the Solr field's name (without analyzing)static String
getIndexingFieldName
(MetadataType type, String fieldPath, String language, boolean fullText) Get the Solr field namestatic String
getJoinFieldName
(String metadataPath) Get the field name for joinstatic String
getMetadataSortFieldName
(MetadataType type, String metadataPath) Get the Solr field name for sortingstatic String
getSortFieldSuffix
(MetadataType metaType) Get the suffix for sortingstatic String
getSortValue
(String string) Get the sort value for a string.static String
getStringFieldSuffix
(String language, boolean fullText) Get a field suffix from its type.static String
getStringIndexingFieldName
(String fieldPath, String language, boolean fullText) Get the Solr field name (without analyzing)static String
Get the wildcard field suffix
-
Method Details
-
getStringIndexingFieldName
public static String getStringIndexingFieldName(String fieldPath, String language, boolean fullText) Get the Solr field name (without analyzing)- Parameters:
fieldPath
- The path to metadatalanguage
- The query language.fullText
-true
for a full-text query, false otherwise.- Returns:
- the Solr field name
-
getIndexingFieldName
Get the Solr field name (without analyzing)- Parameters:
type
- The typefieldPath
- The path to metadata- Returns:
- the Solr field name
-
getIndexingFieldName
Get the Solr field's name (without analyzing)- Parameters:
type
- The typefieldPath
- The path to metadatalanguage
- The query language.- Returns:
- the Solr field's name
-
getIndexingFieldName
public static String getIndexingFieldName(MetadataType type, String fieldPath, String language, boolean fullText) Get the Solr field name- Parameters:
type
- The typefieldPath
- The path to metadatalanguage
- The query language.fullText
- true if field should be analyzed.- Returns:
- the Solr field name
-
getStringFieldSuffix
Get a field suffix from its type.- Parameters:
language
- The query language.fullText
-true
for a full-text query, false otherwise.- Returns:
- the field name suffix.
-
getWildcardFieldSuffix
Get the wildcard field suffix- Returns:
- the field name suffix.
-
getFulltextFieldSuffix
Get the wildcard field suffix- Parameters:
language
- The query language.- Returns:
- the field name suffix.
-
getFieldSuffix
Get a field suffix from its type.- Parameters:
type
- the field type.- Returns:
- the field name suffix.
-
getFieldSuffix
Get a field suffix from its type.- Parameters:
type
- the field type.language
- The search language.fullText
- true if the field is indexed full-text, false otherwise.- Returns:
- the field name suffix.
-
getMetadataSortFieldName
Get the Solr field name for sorting- Parameters:
type
- The typemetadataPath
- The path to metadata- Returns:
- the Solr field name
-
getSortFieldSuffix
Get the suffix for sorting- Parameters:
metaType
- The type- Returns:
- The sort field suffix.
-
getJoinFieldName
Get the field name for join- Parameters:
metadataPath
- The metadata path, separated by '/'- Returns:
- the join field name
-
getSortValue
Get the sort value for a string.- Parameters:
string
- the string to index in a sort field.- Returns:
- the sort value.
-