Package org.ametys.cms.search.solr.field
Class MultilingualStringSearchField
- java.lang.Object
-
- org.ametys.cms.search.solr.field.AbstractMetadataSearchField
-
- org.ametys.cms.search.solr.field.MultilingualStringSearchField
-
- All Implemented Interfaces:
SearchField
public class MultilingualStringSearchField extends AbstractMetadataSearchField
String generic search field.
-
-
Field Summary
Fields Modifier and Type Field Description private Optional<Context>
_context
-
Fields inherited from class org.ametys.cms.search.solr.field.AbstractMetadataSearchField
_joinPaths, _path
-
-
Constructor Summary
Constructors Constructor Description MultilingualStringSearchField(String path, Optional<Context> context)
Build a multilingual string search field.MultilingualStringSearchField(List<String> joinPaths, String finalPath, Optional<Context> context)
Build a multilingual string search field.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
_getFacetFieldSuffix()
Get the facet field suffix corresponding to this field.protected String
_getSortFieldSuffix()
Get the sort field suffix corresponding to this field.protected static Optional<String>
getCurrentLanguage(Optional<Context> context)
Gets the current language-
Methods inherited from class org.ametys.cms.search.solr.field.AbstractMetadataSearchField
getFacetField, getJoinedPaths, getName, getSortField, isJoined
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.search.SearchField
getFacetFunction
-
-
-
-
Constructor Detail
-
MultilingualStringSearchField
public MultilingualStringSearchField(String path, Optional<Context> context)
Build a multilingual string search field.- Parameters:
path
- The field path.context
- The context
-
-
Method Detail
-
_getSortFieldSuffix
protected String _getSortFieldSuffix()
Description copied from class:AbstractMetadataSearchField
Get the sort field suffix corresponding to this field. Return null if not sortable.- Specified by:
_getSortFieldSuffix
in classAbstractMetadataSearchField
- Returns:
- the sort field suffix. Null if not sortable.
-
getCurrentLanguage
protected static Optional<String> getCurrentLanguage(Optional<Context> context)
Gets the current language- Parameters:
context
- The context- Returns:
- the current language
-
_getFacetFieldSuffix
protected String _getFacetFieldSuffix()
Description copied from class:AbstractMetadataSearchField
Get the facet field suffix corresponding to this field. Return null if not facetable.- Specified by:
_getFacetFieldSuffix
in classAbstractMetadataSearchField
- Returns:
- the facet field suffix. Null if not facetable.
-
-