|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LuceneCocoonSearcher
The avalon behavioural component interface of a searcher.
This component defines an interface for searching. The idea is to abstract the process of searching having a query string, and an index, and generating hits which matches the query string in the index.
Field Summary | |
---|---|
static String |
ROLE
The ROLE name of this avalon component. |
Method Summary | |
---|---|
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
Gets the analyzer attribute of the LuceneCocoonSearcher object The analyzer determines the tokenization of the query, and strategy of matching. |
org.apache.lucene.search.Hits |
search(org.apache.lucene.search.Query query)
Search using a Lucene Query object, returning zero, or more hits. |
org.apache.lucene.search.Hits |
search(String query_string,
String default_field)
Search a query-string, returning zero, or more hits. |
void |
setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Sets the analyzer attribute of the LuceneCocoonSearcher object The analyzer determines the tokenization of the query, and strategy of matching. |
void |
setDirectory(org.apache.lucene.store.Directory directory)
Sets the directory attribute of the LuceneCocoonSearcher object The directory specifies the directory used for looking up the index. |
Field Detail |
---|
static final String ROLE
Its value if the FQN of this interface,
ie. org.apache.cocoon.components.search.LuceneCocoonSearcher
.
Method Detail |
---|
void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
The analyzer determines the tokenization of the query, and strategy of matching.
The analyzer class defined here should be equivalent to the analyzer class used when creating the index used for searching.
analyzer
- The new analyzer valueorg.apache.lucene.analysis.Analyzer getAnalyzer()
The analyzer determines the tokenization of the query, and strategy of matching.
The analyzer class defined here should be equivalent to the analyzer class used when creating the index used for searching.
void setDirectory(org.apache.lucene.store.Directory directory)
The directory specifies the directory used for looking up the index. It defines the physical place of the index
directory
- The new directory valueorg.apache.lucene.search.Hits search(String query_string, String default_field) throws ProcessingException
query_string
- A query string parsable by a query parser.default_field
- The default field of the query string.
ProcessingException
- throwing due to processing errors while
looking up the index directory, parsing the query string, generating the hits.org.apache.lucene.search.Hits search(org.apache.lucene.search.Query query) throws ProcessingException
query
- A lucene query
ProcessingException
- throwing due to processing errors while
looking up the index directory, parsing the query string, generating the hits.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |