Package org.ametys.cms.search.solr.field
Class ContentSearchField
- java.lang.Object
-
- org.ametys.cms.search.solr.field.AbstractMetadataSearchField
-
- org.ametys.cms.search.solr.field.StringSearchField
-
- org.ametys.cms.search.solr.field.ContentSearchField
-
- All Implemented Interfaces:
SearchField
public class ContentSearchField extends StringSearchField
Content generic search field.
-
-
Field Summary
-
Fields inherited from class org.ametys.cms.search.solr.field.AbstractMetadataSearchField
_joinPaths, _path
-
-
Constructor Summary
Constructors Constructor Description ContentSearchField(String path)
Build a content search field.ContentSearchField(String path, boolean isMultilingual, Optional<Context> context)
Build a content search field.ContentSearchField(List<String> joinPaths, String finalPath)
Build a content search field.ContentSearchField(List<String> joinPaths, String finalPath, boolean isMultilingual, Optional<Context> context)
Build a content search field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
_getSortFieldSuffix()
Get the sort field suffix corresponding to this field.String
getFacetField()
Get the facet field corresponding to this field.List<String>
getJoinedPaths()
Gets the joined paths-
Methods inherited from class org.ametys.cms.search.solr.field.StringSearchField
_getFacetFieldSuffix
-
Methods inherited from class org.ametys.cms.search.solr.field.AbstractMetadataSearchField
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
-
ContentSearchField
public ContentSearchField(String path)
Build a content search field.- Parameters:
path
- The field path.
-
ContentSearchField
public ContentSearchField(List<String> joinPaths, String finalPath)
Build a content search field.- Parameters:
joinPaths
- The join field pathsfinalPath
- The final field path.
-
ContentSearchField
public ContentSearchField(String path, boolean isMultilingual, Optional<Context> context)
Build a content search field.- Parameters:
path
- The field path.isMultilingual
-true
if the Content has a multlilingual titlecontext
- The context
-
ContentSearchField
public ContentSearchField(List<String> joinPaths, String finalPath, boolean isMultilingual, Optional<Context> context)
Build a content search field.- Parameters:
joinPaths
- The join field pathsfinalPath
- The final field path.isMultilingual
-true
if the Content has a multilingual titlecontext
- The context
-
-
Method Detail
-
getJoinedPaths
public List<String> getJoinedPaths()
Description copied from interface:SearchField
Gets the joined paths- Specified by:
getJoinedPaths
in interfaceSearchField
- Overrides:
getJoinedPaths
in classAbstractMetadataSearchField
- Returns:
- the joined paths
-
_getSortFieldSuffix
protected String _getSortFieldSuffix()
Description copied from class:AbstractMetadataSearchField
Get the sort field suffix corresponding to this field. Return null if not sortable.- Overrides:
_getSortFieldSuffix
in classStringSearchField
- Returns:
- the sort field suffix. Null if not sortable.
-
getFacetField
public String getFacetField()
Description copied from interface:SearchField
Get the facet field corresponding to this field.- Specified by:
getFacetField
in interfaceSearchField
- Overrides:
getFacetField
in classAbstractMetadataSearchField
- Returns:
- The facet field.
-
-