CLucene - a full-featured, c++ search engine
API Documentation


lucene::search::Searcher Class Reference

An abstract base class for search implementations. More...

#include <Searchable.h>

Inheritance diagram for lucene::search::Searcher:

lucene::search::Searchable lucene::search::IndexSearcher lucene::search::MultiSearcher

Public Member Functions

 Searcher ()
virtual ~Searcher ()
Hitssearch (Query *query)
Hitssearch (Query *query, Filter *filter)
Hitssearch (Query *query, const Sort *sort)
 Returns documents matching query sorted by sort.
Hitssearch (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.
SimilaritygetSimilarity ()
 Expert: Return the Similarity implementation used by this Searcher.
virtual const TCHAR * getClassName ()
virtual void _search (Query *query, Filter *filter, HitCollector *results)=0
 Lower-level search API.

Detailed Description

An abstract base class for search implementations.

Implements some common utility methods.


Constructor & Destructor Documentation

lucene::search::Searcher::Searcher (  ) 

virtual lucene::search::Searcher::~Searcher (  )  [virtual]


Member Function Documentation

Hits* lucene::search::Searcher::search ( Query query  ) 

Hits* lucene::search::Searcher::search ( Query query,
Filter filter 
)

Hits* lucene::search::Searcher::search ( Query query,
const Sort sort 
)

Returns documents matching query sorted by sort.

Hits* lucene::search::Searcher::search ( Query query,
Filter filter,
const Sort sort 
)

Returns documents matching query and filter, sorted by sort.

void lucene::search::Searcher::_search ( Query query,
HitCollector results 
)

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.

void lucene::search::Searcher::setSimilarity ( Similarity similarity  ) 

Expert: Set the Similarity implementation used by this Searcher.

See also:
Similarity::setDefault(Similarity)

Similarity* lucene::search::Searcher::getSimilarity (  ) 

Expert: Return the Similarity implementation used by this Searcher.

This defaults to the current value of Similarity#getDefault().

virtual const TCHAR* lucene::search::Searcher::getClassName (  )  [virtual]

Reimplemented in lucene::search::IndexSearcher.

virtual void lucene::search::Searcher::_search ( Query query,
Filter filter,
HitCollector results 
) [pure virtual]

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.

Parameters:
query to match documents
filter if non-null, a bitset used to eliminate some documents
results to receive hits

Implements lucene::search::Searchable.

Implemented in lucene::search::IndexSearcher, and lucene::search::MultiSearcher.


The documentation for this class was generated from the following file:

clucene.sourceforge.net