public interface SearchProvider
Site
, every Application
of the site is checked for
SearchProvider
s offering some Document
s.Document
,
FeatureProvider.getIndexer()
,
DocumentProvider
Modifier and Type | Field and Description |
---|---|
static int |
MAX_HITS |
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
|
static final int MAX_HITS
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
env
- the current Environment
site
- the current Site
application
- the current Application
directory
- the Directory
representing the current Site
's Lucene index.Application
also
contributes some Document
s 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 Document
s 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 div
parameters
- some custom parameters for this searchIterable
<Document
> containing the found Document
sIOException
- if an error occurs while searchingCopyright © 2011–2020 aiticon GmbH. All rights reserved.