|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Searcher
this Searcher Component allows:
- searching in several indexes
- sorting hits by a
specified field and order
Field Summary | |
---|---|
static java.lang.String |
ROLE
The ROLE name of this avalon component. |
Method Summary | |
---|---|
void |
addDirectory(org.apache.lucene.store.Directory directory)
Add a lucene directory -- you can add several directories The directory specifies the directory used for looking up the index. |
org.apache.lucene.search.Hits |
search(org.apache.lucene.search.Query query)
Search using a Lucene Query object, returning zero, or more hits. |
void |
setSortField(java.lang.String field,
boolean reverse)
Set the field by which the search results are to be sorted |
Field Detail |
---|
static final java.lang.String ROLE
Its value if the FQN of this interface, ie.
org.apache.cocoon.components.search.Searcher
.
Method Detail |
---|
void addDirectory(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 valuevoid setSortField(java.lang.String field, boolean reverse)
field
- the index fieldreverse
- reverse order or notorg.apache.lucene.search.Hits search(org.apache.lucene.search.Query query) throws org.apache.cocoon.ProcessingException
query
- A lucene query
org.apache.cocoon.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 |