Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » components » search » [javadoc | source]
org.apache.cocoon.components.search
public interface: LuceneCocoonSearcher [javadoc | source]

All Implemented Interfaces:
    org.apache.avalon.framework.component.Component

All Known Implementing Classes:
    SimpleLuceneCocoonSearcherImpl

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
 String ROLE    The ROLE name of this avalon component.

Its value if the FQN of this interface, ie. org.apache.cocoon.components.search.LuceneCocoonSearcher.

    since:
 
Method from org.apache.cocoon.components.search.LuceneCocoonSearcher Summary:
getAnalyzer,   search,   search,   setAnalyzer,   setDirectory
Method from org.apache.cocoon.components.search.LuceneCocoonSearcher Detail:
 public Analyzer getAnalyzer()
    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.

 public Hits search(Query query) throws ProcessingException
    Search using a Lucene Query object, returning zero, or more hits.

 public Hits search(String query_string,
    String default_field) throws ProcessingException
    Search a query-string, returning zero, or more hits.

 public  void setAnalyzer(Analyzer analyzer)
    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.

 public  void setDirectory(Directory directory)
    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