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


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
Lucene::ParallelMultiSearcher Class Reference

Implements parallel search over a set of Searchables. More...

#include <ParallelMultiSearcher.h>

+ Inheritance diagram for Lucene::ParallelMultiSearcher:

Public Member Functions

 ParallelMultiSearcher (Collection< SearchablePtr > searchables)
 Creates a Searchable which searches searchables.
 
virtual ~ParallelMultiSearcher ()
 
virtual String getClassName ()
 
boost::shared_ptr< ParallelMultiSearchershared_from_this ()
 
virtual int32_t docFreq (const TermPtr &term)
 Executes each Searchable's docFreq() in its own thread and waits for each search to complete and merge the results back together.
 
virtual TopDocsPtr search (const WeightPtr &weight, const FilterPtr &filter, int32_t n)
 A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.
 
virtual TopFieldDocsPtr search (const WeightPtr &weight, const FilterPtr &filter, int32_t n, const SortPtr &sort)
 A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
 
- Public Member Functions inherited from Lucene::MultiSearcher
 MultiSearcher (Collection< SearchablePtr > searchables)
 Creates a searcher which searches searchers.
 
virtual ~MultiSearcher ()
 
boost::shared_ptr< MultiSearchershared_from_this ()
 
Collection< SearchablePtrgetSearchables ()
 Return the array of Searchables this searches.
 
virtual void close ()
 Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects that reference this Searchable.
 
virtual DocumentPtr doc (int32_t n)
 Returns the stored fields of document i.
 
virtual DocumentPtr doc (int32_t n, const FieldSelectorPtr &fieldSelector)
 Get the Document at the n'th position. The FieldSelector may be used to determine what Fields to load and how they should be loaded.
 
int32_t subSearcher (int32_t n)
 Returns index of the searcher for document n in the array used to construct this searcher.
 
int32_t subDoc (int32_t n)
 Returns the document number of document n within its sub-index.
 
virtual int32_t maxDoc ()
 Returns one greater than the largest possible document number.
 
virtual void search (const WeightPtr &weight, const FilterPtr &filter, const CollectorPtr &results)
 Lower-level search API.
 
virtual QueryPtr rewrite (const QueryPtr &query)
 Called to re-write queries into primitive queries.
 
virtual ExplanationPtr explain (const WeightPtr &weight, int32_t doc)
 Low-level implementation method. Returns an Explanation that describes how doc scored against weight.
 
virtual TopFieldDocsPtr search (const QueryPtr &query, const FilterPtr &filter, int32_t n, const SortPtr &sort)
 Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.
 
virtual void search (const QueryPtr &query, const CollectorPtr &results)
 Lower-level search API.
 
virtual void search (const QueryPtr &query, const FilterPtr &filter, const CollectorPtr &results)
 Lower-level search API.
 
virtual TopDocsPtr search (const QueryPtr &query, const FilterPtr &filter, int32_t n)
 Finds the top n hits for query, applying filter if non-null.
 
virtual TopDocsPtr search (const QueryPtr &query, int32_t n)
 Finds the top n hits for query.
 
virtual void search (const WeightPtr &weight, const FilterPtr &filter, const CollectorPtr &results)=0
 Lower-level search API.
 
- Public Member Functions inherited from Lucene::Searcher
 Searcher ()
 
virtual ~Searcher ()
 
boost::shared_ptr< Searchershared_from_this ()
 
virtual ExplanationPtr explain (const QueryPtr &query, int32_t doc)
 Returns an Explanation that describes how doc scored against query.
 
virtual void setSimilarity (const SimilarityPtr &similarity)
 Set the Similarity implementation used by this Searcher.
 
virtual SimilarityPtr getSimilarity ()
 Return the Similarity implementation used by this Searcher.
 
virtual Collection< int32_t > docFreqs (Collection< TermPtr > terms)
 For each term in the terms array, calculates the number of documents containing term. Returns an array with these document frequencies. Used to minimize number of remote calls.
 
- Public Member Functions inherited from Lucene::Searchable
virtual ~Searchable ()
 
- Public Member Functions inherited from Lucene::LuceneObject
virtual ~LuceneObject ()
 
virtual void initialize ()
 Called directly after instantiation to create objects that depend on this object being fully constructed.
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
 
virtual int32_t hashCode ()
 Return hash code for this object.
 
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal.
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
 
virtual String toString ()
 Returns a string representation of the object.
 
- Public Member Functions inherited from Lucene::LuceneSync
virtual ~LuceneSync ()
 
virtual SynchronizePtr getSync ()
 Return this object synchronize lock.
 
virtual LuceneSignalPtr getSignal ()
 Return this object signal.
 
virtual void lock (int32_t timeout=0)
 Lock this object using an optional timeout.
 
virtual void unlock ()
 Unlock this object.
 
virtual bool holdsLock ()
 Returns true if this object is currently locked by current thread.
 
virtual void wait (int32_t timeout=0)
 Wait for signal using an optional timeout.
 
virtual void notifyAll ()
 Notify all threads waiting for signal.
 

Static Public Member Functions

static String _getClassName ()
 
- Static Public Member Functions inherited from Lucene::MultiSearcher
static String _getClassName ()
 
- Static Public Member Functions inherited from Lucene::Searcher
static String _getClassName ()
 
- Static Public Member Functions inherited from Lucene::Searchable
static String _getClassName ()
 

Additional Inherited Members

- Protected Member Functions inherited from Lucene::MultiSearcher
Collection< int32_t > getStarts ()
 
virtual WeightPtr createWeight (const QueryPtr &query)
 Create weight in multiple index scenario.
 
- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 
- Protected Attributes inherited from Lucene::MultiSearcher
Collection< SearchablePtrsearchables
 
Collection< int32_t > starts
 
int32_t _maxDoc
 
- Protected Attributes inherited from Lucene::Searcher
SimilarityPtr similarity
 The Similarity implementation used by this searcher.
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Detailed Description

Implements parallel search over a set of Searchables.

Applications usually need only call the inherited search(QueryPtr, int32_t) or search(QueryPtr, FilterPtr, int32_t) methods.

Constructor & Destructor Documentation

◆ ParallelMultiSearcher()

Lucene::ParallelMultiSearcher::ParallelMultiSearcher ( Collection< SearchablePtr searchables)

Creates a Searchable which searches searchables.

◆ ~ParallelMultiSearcher()

virtual Lucene::ParallelMultiSearcher::~ParallelMultiSearcher ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::ParallelMultiSearcher::_getClassName ( )
inlinestatic

◆ docFreq()

virtual int32_t Lucene::ParallelMultiSearcher::docFreq ( const TermPtr term)
virtual

Executes each Searchable's docFreq() in its own thread and waits for each search to complete and merge the results back together.

Reimplemented from Lucene::MultiSearcher.

◆ getClassName()

virtual String Lucene::ParallelMultiSearcher::getClassName ( )
inlinevirtual

Reimplemented from Lucene::MultiSearcher.

◆ search() [1/2]

virtual TopDocsPtr Lucene::ParallelMultiSearcher::search ( const WeightPtr weight,
const FilterPtr filter,
int32_t  n 
)
virtual

A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.

Reimplemented from Lucene::MultiSearcher.

◆ search() [2/2]

virtual TopFieldDocsPtr Lucene::ParallelMultiSearcher::search ( const WeightPtr weight,
const FilterPtr filter,
int32_t  n,
const SortPtr sort 
)
virtual

A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.

Reimplemented from Lucene::MultiSearcher.

◆ shared_from_this()

boost::shared_ptr< ParallelMultiSearcher > Lucene::ParallelMultiSearcher::shared_from_this ( )
inline

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

clucene.sourceforge.net