Object | +--helma.Search.Searcher
This class provides basic functionality for
searching an index.
Defined in Search.js
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |
| Constructor Summary | |
helma.Search.Searcher(<helma.Search.Index> index)
Creates a new instance of helma.Search.Seacher |
|
| Properties Summary | |
helma.Search.HitCollection |
hits
The search results. |
java.util.Vector |
sortFields
A vector with SortField instances, if any have been defined. |
| Methods Summary | |
void
|
close()
Closes the wrapped IndexSearcher instance. |
org.apache.lucene.search.IndexSearcher
|
getSearcher()
Returns the wrapped IndexSearcher instance. |
Number
|
search(<helma.Search.Query> query, <helma.Search.QueryFilter> filter)
Searches an index using the query passed as argument. |
void
|
sortBy(<String> fieldName )
Sets a field as result sorting field. |
| Constructor Detail |
helma.Search.Searcher(<helma.Search.Index> index)
index - The index to search in.
| Properties Detail |
helma.Search.HitCollection hits
java.util.Vector sortFields
| Method Detail |
void close()
org.apache.lucene.search.IndexSearcher getSearcher()
Number search(<helma.Search.Query> query, <helma.Search.QueryFilter> filter)
query - The query to use for searching
filter - An optional query filter for filtering the results.
void sortBy(<String> fieldName )
fieldName - The name of the field in the index by which the search result should be ordered.
type - The type of the field defined by argument fieldName. Valid arguments are "string", "float", "int", "score", "doc", "auto", "custom". Default is "auto". See http://lucene.apache.org/java/docs/api/org/apache/lucene/search/SortField.html for an explanation.
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |