CLucene - a full-featured, c++ search engine
API Documentation
An abstract base class for search implementations. More...
#include <SearchHeader.h>
Public Member Functions | |
| Searcher () | |
| virtual | ~Searcher () |
| Hits * | search (Query *query) |
| Hits * | search (Query *query, Filter *filter) |
| Hits * | search (Query *query, const Sort *sort) |
Returns documents matching query sorted by sort. | |
| Hits * | search (Query *query, Filter *filter, const Sort *sort) |
Returns documents matching query and filter, sorted by sort. | |
| void | _search (Query *query, HitCollector *results) |
| Lower-level search API. | |
| void | setSimilarity (Similarity *similarity) |
| Expert: Set the Similarity implementation used by this Searcher. | |
| Similarity * | getSimilarity () |
| Expert: Return the Similarity implementation used by this Searcher. | |
An abstract base class for search implementations.
Implements some common utility methods.
| lucene::search::Searcher::Searcher | ( | ) | [inline] |
| virtual lucene::search::Searcher::~Searcher | ( | ) | [inline, virtual] |
| void lucene::search::Searcher::_search | ( | Query * | query, | |
| HitCollector * | results | |||
| ) | [inline] |
Lower-level search API.
HitCollector#collect(int32_t ,float_t) is called for every non-zero scoring document.
Applications should only use this if they need all of the matching documents. The high-level search API (Searcher#search(Query*)) is usually more efficient, as it skips non-high-scoring hits.
Note: The score passed to this method is a raw score. In other words, the score will not necessarily be a float whose value is between 0 and 1.
| Similarity* lucene::search::Searcher::getSimilarity | ( | ) | [inline] |
Expert: Return the Similarity implementation used by this Searcher.
This defaults to the current value of Similarity#getDefault().
| Hits* lucene::search::Searcher::search | ( | Query * | query, | |
| Filter * | filter, | |||
| const Sort * | sort | |||
| ) | [inline] |
Returns documents matching query and filter, sorted by sort.
References _CLNEW.
Returns documents matching query sorted by sort.
References _CLNEW.
References _CLNEW.
| void lucene::search::Searcher::setSimilarity | ( | Similarity * | similarity | ) | [inline] |
Expert: Set the Similarity implementation used by this Searcher.