public class StandardSearcher extends Object implements SearchProvider
MAX_HITS| Constructor and Description |
|---|
StandardSearcher() |
| Modifier and Type | Method and Description |
|---|---|
Iterable<Document> |
doSearch(Environment env,
Site site,
Application application,
org.apache.lucene.store.Directory directory,
String term,
String language,
String[] parseFields,
org.apache.lucene.analysis.Analyzer analyzer,
String highlightWith,
Map<String,String> parameters)
Performs the actual search
|
protected org.apache.lucene.search.Query |
getQuery(String[] parseFields,
String searchTerm,
org.apache.lucene.analysis.Analyzer analyzer,
String language,
String[] excludeTypes) |
String |
getSearchTerm(String searchTerm,
String searchTermTransform) |
public Iterable<Document> doSearch(Environment env, Site site, Application application, org.apache.lucene.store.Directory directory, String term, String language, String[] parseFields, org.apache.lucene.analysis.Analyzer analyzer, String highlightWith, Map<String,String> parameters) throws IOException
SearchProviderdoSearch in interface SearchProviderenv - the current Environmentsite - the current Siteapplication - the current Applicationdirectory - the Directory representing the current Site's Lucene index.Application
also contributes some Documents to the Site's global index by using
FeatureProvider.getIndexer() or implementing DocumentProvider. Otherwise,
the Application might have it's own Lucene index or even get the Documents
from somewhere else (for example from the database or filesystem).term - the search termlanguage - the language for the searchparseFields - the fields to searchanalyzer - the Analyzer to usehighlightWith - a tagname to highlight fragments with, e.g span or divparameters - some custom parameters for this searchIterable<Document> containing the found DocumentsIOException - if an error occurs while searchingprotected org.apache.lucene.search.Query getQuery(String[] parseFields, String searchTerm, org.apache.lucene.analysis.Analyzer analyzer, String language, String[] excludeTypes) throws org.apache.lucene.queryparser.classic.ParseException
org.apache.lucene.queryparser.classic.ParseExceptionCopyright © 2011–2021 aiticon GmbH. All rights reserved.