public class TagsSuggesterImpl extends Object implements TagsSuggester
| Constructor and Description |
|---|
TagsSuggesterImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Long> |
facetedSuggestion(String prefix,
String startPath,
Long mincount,
Long limit,
Long offset,
boolean sortByCount,
JCRSessionWrapper sessionWrapper)
Use a faceted query to suggest tags
|
void |
setFaceted(boolean faceted) |
protected Map<String,Long> |
simpleSuggestion(String prefix,
String startPath,
Long limit,
JCRSessionWrapper sessionWrapper)
Use a simple query to suggest tags
|
Map<String,Long> |
suggest(String prefix,
String startPath,
Long mincount,
Long limit,
Long offset,
boolean sortByCount,
JCRSessionWrapper sessionWrapper)
To switch between faceted suggester and default, you have to set this property to true
tag.suggester.faceted in the jahia.properties
|
public Map<String,Long> suggest(String prefix, String startPath, Long mincount, Long limit, Long offset, boolean sortByCount, JCRSessionWrapper sessionWrapper) throws javax.jcr.RepositoryException
suggest in interface TagsSuggesterprefix - The text used to match the tags to retrievestartPath - The path used to search the tagsmincount - Minimum usage count for a tag to be return (supported by faceted suggester only)limit - Limit of tags returnoffset - Offset used in the query (supported by faceted suggester only)sortByCount - Sort tags by count (supported by faceted suggester only)sessionWrapper - current sessionjavax.jcr.RepositoryException - in case of JCR-related errorsprotected Map<String,Long> facetedSuggestion(String prefix, String startPath, Long mincount, Long limit, Long offset, boolean sortByCount, JCRSessionWrapper sessionWrapper) throws javax.jcr.RepositoryException
prefix - the prefix to search onstartPath - the path to start the searchmincount - the minimum for a tag to be include in the resultlimit - the limit of tag returnedoffset - offsetsortByCount - sort the map by countsessionWrapper - the session used to do the queryjavax.jcr.RepositoryException - in case of JCR-related errorsprotected Map<String,Long> simpleSuggestion(String prefix, String startPath, Long limit, JCRSessionWrapper sessionWrapper) throws javax.jcr.RepositoryException
prefix - the prefix to search onstartPath - the path to start the searchlimit - the limit of tag returnedsessionWrapper - the session used to do the queryjavax.jcr.RepositoryException - in case of JCR-related errorspublic void setFaceted(boolean faceted)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.