| org.apache.cocoon.components.search.LuceneCocoonSearcher
All known Subclasses: org.apache.cocoon.components.search.SimpleLuceneCocoonSearcherImpl,
LuceneCocoonSearcher | public interface LuceneCocoonSearcher extends Component(Code) | | 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.
author: Bernhard Huber version: CVS $Id: LuceneCocoonSearcher.java 433543 2006-08-22 06:22:54Z crossley $ |
Field Summary | |
String | ROLE The ROLE name of this avalon component.
Its value if the FQN of this interface,
ie. |
Method Summary | |
Analyzer | getAnalyzer() Gets the analyzer attribute of the LuceneCocoonSearcher object
The analyzer determines the tokenization of the query,
and strategy of matching. | Hits | search(String query_string, String default_field) Search a query-string, returning zero, or more hits.
Parameters: query_string - A query string parsable by a query parser. Parameters: default_field - The default field of the query string. | Hits | search(Query query) Search using a Lucene Query object, returning zero, or more hits. | void | setAnalyzer(Analyzer analyzer) Sets the analyzer attribute of the LuceneCocoonSearcher object
The analyzer determines the tokenization of the query,
and strategy of matching. | void | setDirectory(Directory directory) Sets the directory attribute of the LuceneCocoonSearcher object
The directory specifies the directory used for looking up the
index. |
ROLE | String ROLE(Code) | | The ROLE name of this avalon component.
Its value if the FQN of this interface,
ie. org.apache.cocoon.components.search.LuceneCocoonSearcher .
|
getAnalyzer | Analyzer getAnalyzer()(Code) | | Gets the analyzer attribute of the LuceneCocoonSearcher object
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.
since: 2.1.6 |
search | Hits search(String query_string, String default_field) throws ProcessingException(Code) | | Search a query-string, returning zero, or more hits.
Parameters: query_string - A query string parsable by a query parser. Parameters: default_field - The default field of the query string. Hits zero or more hits matching the query string exception: ProcessingException - throwing due to processing errors whilelooking up the index directory, parsing the query string, generating the hits. |
search | Hits search(Query query) throws ProcessingException(Code) | | Search using a Lucene Query object, returning zero, or more hits.
Parameters: query - A lucene query Hits zero or more hits matching the query string exception: ProcessingException - throwing due to processing errors whilelooking up the index directory, parsing the query string, generating the hits. since: 2.1.6 |
setAnalyzer | void setAnalyzer(Analyzer analyzer)(Code) | | Sets the analyzer attribute of the LuceneCocoonSearcher object
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.
Parameters: analyzer - The new analyzer value |
setDirectory | void setDirectory(Directory directory)(Code) | | Sets the directory attribute of the LuceneCocoonSearcher object
The directory specifies the directory used for looking up the
index. It defines the physical place of the index
Parameters: directory - The new directory value |
|
|