Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::distrib::DistSearchMethod Class Reference

This class supports searching multiple indexes and getting a list of results for each of those indexes. More...

#include <DistSearchMethod.hpp>

List of all members.

Public Member Functions

 DistSearchMethod ()
 DistSearchMethod (const lemur::api::Index *index, lemur::api::RetMethodManager::RetModel defmodel=lemur::api::RetMethodManager::INQUERY)
 ~DistSearchMethod ()
void setReturnCount (int retCount)
 set the return documents number;

void setIndex (const lemur::api::Index *index)
 use the given collection selection index

void setDefaultRetMethod (lemur::api::RetMethodManager::RetModel rt)
 use the given retrieval method to do search if none is specified for an index

void scoreIndexSet (const lemur::api::Query &qry, const lemur::api::IndexedRealVector &indexset, DocScoreVector **results)
 score every document in each index in the indexset for the given query and return results in the results vector

void scoreIndexSet (const lemur::api::Query &qry, const vector< string > &indexset, DocScoreVector **results)
 score every document in each index in the indexset for the given query and return results in the results vector


Static Public Member Functions

void indexToID (const lemur::api::Index *ind, const lemur::api::IndexedRealVector *ivec, DocScoreVector *dvec)
 convert the given IndexRealVector into a DocScoreVector.


Protected Member Functions

void doSingleRetr ()
 assuming all required parameters for index and retrieval method are on the top stack, do retrieval on this single index using the given query.


Protected Attributes

const lemur::api::Indexcsindex
lemur::api::RetMethodManager::RetModel defrt
const lemur::api::Queryquery
DocScoreVector ** allres
int reslen
int returnCount


Detailed Description

This class supports searching multiple indexes and getting a list of results for each of those indexes.

Each index is expected to have a parameter file that tells where its located and which retrieval method to use, similar to parameter files used for TextRetrievalMethods. If no particular RetrievalMethod is specified, a default one will be used (originally set to Okapi


Constructor & Destructor Documentation

lemur::distrib::DistSearchMethod::DistSearchMethod  )  [inline]
 

lemur::distrib::DistSearchMethod::DistSearchMethod const lemur::api::Index index,
lemur::api::RetMethodManager::RetModel  defmodel = lemur::api::RetMethodManager::INQUERY
[inline]
 

lemur::distrib::DistSearchMethod::~DistSearchMethod  )  [inline]
 


Member Function Documentation

void lemur::distrib::DistSearchMethod::doSingleRetr  )  [protected]
 

assuming all required parameters for index and retrieval method are on the top stack, do retrieval on this single index using the given query.

void lemur::distrib::DistSearchMethod::indexToID const lemur::api::Index ind,
const lemur::api::IndexedRealVector ivec,
DocScoreVector dvec
[static]
 

convert the given IndexRealVector into a DocScoreVector.

void lemur::distrib::DistSearchMethod::scoreIndexSet const lemur::api::Query qry,
const vector< string > &  indexset,
DocScoreVector **  results
 

score every document in each index in the indexset for the given query and return results in the results vector

void lemur::distrib::DistSearchMethod::scoreIndexSet const lemur::api::Query qry,
const lemur::api::IndexedRealVector indexset,
DocScoreVector **  results
 

score every document in each index in the indexset for the given query and return results in the results vector

although the scores in indexset probably won't be used, take an IndexedRealVector here because that's what's returned by the RetrievalMethod so would make writing code easier. the indexes in indexset should correspond to indexes in the collection selection index.

void lemur::distrib::DistSearchMethod::setDefaultRetMethod lemur::api::RetMethodManager::RetModel  rt  )  [inline]
 

use the given retrieval method to do search if none is specified for an index

void lemur::distrib::DistSearchMethod::setIndex const lemur::api::Index index  )  [inline]
 

use the given collection selection index

void lemur::distrib::DistSearchMethod::setReturnCount int  retCount  )  [inline]
 

set the return documents number;


Member Data Documentation

DocScoreVector** lemur::distrib::DistSearchMethod::allres [protected]
 

const lemur::api::Index* lemur::distrib::DistSearchMethod::csindex [protected]
 

lemur::api::RetMethodManager::RetModel lemur::distrib::DistSearchMethod::defrt [protected]
 

const lemur::api::Query* lemur::distrib::DistSearchMethod::query [protected]
 

int lemur::distrib::DistSearchMethod::reslen [protected]
 

int lemur::distrib::DistSearchMethod::returnCount [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:05 2010 for Lemur by doxygen 1.3.4