00001 /*========================================================================== 00002 * Copyright (c) 2001 Carnegie Mellon University. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.cs.cmu.edu/~lemur/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00020 #include "common_headers.hpp" 00021 #include "RetrievalMethod.hpp" 00022 #include "RetMethodManager.hpp" 00023 #include "IndexManager.hpp" 00024 #include "DocScore.hpp" 00025 00026 class DistSearchMethod { 00027 public: 00028 DistSearchMethod() {csindex = NULL; defrt = RetMethodManager::OKAPI; } 00029 DistSearchMethod(Index* index, RetMethodManager::RetModel defmodel=RetMethodManager::OKAPI) {csindex = index; defrt = defmodel;} 00030 ~DistSearchMethod() {} 00031 00033 void setIndex(Index* index){csindex = index;} ; 00034 00036 void setDefaultRetMethod(RetMethodManager::RetModel rt) {defrt = rt;}; 00037 00039 00045 void scoreIndexSet(Query &qry, IndexedRealVector &indexset, DocScoreVector** results); 00046 00048 void scoreIndexSet(Query &qry, vector<string> &indexset, DocScoreVector** results); 00049 00051 static void indexToID(Index* ind, IndexedRealVector* ivec, DocScoreVector* dvec); 00052 00053 protected: 00055 void doSingleRetr(); 00056 00057 Index* csindex; // the collection selection index 00058 RetMethodManager::RetModel defrt; // default retrieval method to use if no param is avail 00059 Query* query; // the query we're currently working on 00060 DocScoreVector** allres; // where to store all results 00061 int reslen; // length of allres 00062 };
1.2.4 written by Dimitri van Heesch,
© 1997-2000