public class BasicLuceneSearchEnginePolicyFilter extends AbstractPolicyFilter implements LuceneSearchEnginePolicyFilter, PluginComponent
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REVISION |
order| Constructor and Description |
|---|
BasicLuceneSearchEnginePolicyFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
filterCategoryDocument(org.apache.lucene.document.Document doc,
Category cat,
java.lang.String lang)
This method is called when the given Category is being index in the given language,
just before writing the Document into the index.
|
void |
filterMemberDocument(org.apache.lucene.document.Document doc,
Member mbr)
This method is called when the given Member is being index,
just before writing the Document into the index.
|
void |
filterPublicationDocument(org.apache.lucene.document.Document doc,
Publication pub,
java.lang.String lang)
This method is called when the given Publication is being index in the given language,
just before writing the Document into the index.
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer(java.lang.String lang,
boolean isIndexing,
org.apache.lucene.analysis.Analyzer analyser)
Return the Lucene Analyzer to use for a given language.
|
java.util.HashSet<java.lang.String> |
getLanguageStopWordsSet(java.lang.String lang,
java.util.HashSet<java.lang.String> jcms)
Retrieves stop words of the specified language.
|
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration
|
org.apache.lucene.search.Query |
parseQuery(java.lang.String searchString,
ParseOptions options,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.search.Query query)
Parse the specified search string into a Lucene Query.
|
compareTo, equals, getOrder, setOrderpublic static final java.lang.String REVISION
public boolean init(Plugin plugin)
PluginComponentinit in interface PluginComponentplugin - the calling pluginPluginComponent.init(Plugin)public java.util.HashSet<java.lang.String> getLanguageStopWordsSet(java.lang.String lang,
java.util.HashSet<java.lang.String> jcms)
LuceneSearchEnginePolicyFiltergetLanguageStopWordsSet in interface LuceneSearchEnginePolicyFilterlang - a ISO-639 language codejcms - the default Set stop word configured in JCMSLuceneSearchEnginePolicyFilter.getLanguageStopWordsSet(String, HashSet)public org.apache.lucene.analysis.Analyzer getAnalyzer(java.lang.String lang,
boolean isIndexing,
org.apache.lucene.analysis.Analyzer analyser)
LuceneSearchEnginePolicyFiltergetAnalyzer in interface LuceneSearchEnginePolicyFilterlang - the ISO-639 code of the language analyzedisIndexing - true if the returned anallyzer is to be used
for indexing, false in any other case (e.g. during search etc..)
You may want to use this parameter to change the behaviour of your
analyzer during those case (for example, synonym analyzer must
generate synonyms only when indexing, not during search).analyser - the internal Analyzer, created by JCMS, that should be
returned if you do not want to return a customize analyzerLuceneSearchEnginePolicyFilter.getAnalyzer(String, boolean, Analyzer)public void filterPublicationDocument(org.apache.lucene.document.Document doc,
Publication pub,
java.lang.String lang)
LuceneSearchEnginePolicyFilterfilterPublicationDocument in interface LuceneSearchEnginePolicyFilterdoc - the lucene Document that was created by JCMS search enginepub - the Publication being indexedlang - the indexed languageLuceneSearchEnginePolicyFilter.filterPublicationDocument(Document, Publication, String)public void filterCategoryDocument(org.apache.lucene.document.Document doc,
Category cat,
java.lang.String lang)
LuceneSearchEnginePolicyFilterfilterCategoryDocument in interface LuceneSearchEnginePolicyFilterdoc - the lucene Document that was created by JCMS search enginecat - the Category being indexedlang - the indexed languageLuceneSearchEnginePolicyFilter.filterCategoryDocument(Document, Category, String)public void filterMemberDocument(org.apache.lucene.document.Document doc,
Member mbr)
LuceneSearchEnginePolicyFilterfilterMemberDocument in interface LuceneSearchEnginePolicyFilterdoc - the lucene Document that was created by JCMS search enginembr - the Member being indexedLuceneSearchEnginePolicyFilter.filterMemberDocument(Document, Member)public org.apache.lucene.search.Query parseQuery(java.lang.String searchString,
ParseOptions options,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.search.Query query)
throws org.apache.lucene.queryparser.classic.ParseException
LuceneSearchEnginePolicyFilterparseQuery in interface LuceneSearchEnginePolicyFiltersearchString - the string to be searchoptions - current parsing optionanalyzer - the analyzer being used for this searchquery - a Query instance already computed by other policy if any (may be null)org.apache.lucene.queryparser.classic.ParseException - on parse errorLuceneSearchEnginePolicyFilter.parseQuery(String, ParseOptions, Analyzer, Query)Copyright © 2001-2017 Jalios SA. All Rights Reserved.