dragon.ir.search
Class AbstractSearcher

java.lang.Object
  |
  +--dragon.ir.search.AbstractSearcher
All Implemented Interfaces:
Searcher
Direct Known Subclasses:
BoolRankSearcher, FeedbackSearcher, FullRankSearcher, PartialRankSearcher, QueryExpansionSearcher

public abstract class AbstractSearcher
extends java.lang.Object
implements Searcher

Abstract class of Searcher

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
protected  java.util.ArrayList hitlist
           
protected  IndexReader indexReader
           
protected  IRQuery query
           
protected  Smoother smoother
           
 
Constructor Summary
AbstractSearcher(IndexReader indexReader, Smoother smoother)
           
 
Method Summary
protected  SimpleTermPredicate[] checkSimpleTermQuery(RelSimpleQuery query)
           
 IndexReader getIndexReader()
           
 IRDoc getIRDoc(int ranking)
          Before calling this method, one should call the search function.
 IRQuery getQuery()
           
 boolean getQueryWeightingOption()
           
 java.util.ArrayList getRankedDocumentList()
           
 int getRetrievedDocNum()
           
 Smoother getSmoother()
           
 void setQueryWeightingOption(boolean option)
          If the weighting option is set to false, the searcher ignores the weight of searching terms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dragon.ir.search.Searcher
search
 

Field Detail

indexReader

protected IndexReader indexReader

hitlist

protected java.util.ArrayList hitlist

query

protected IRQuery query

smoother

protected Smoother smoother
Constructor Detail

AbstractSearcher

public AbstractSearcher(IndexReader indexReader,
                        Smoother smoother)
Method Detail

checkSimpleTermQuery

protected SimpleTermPredicate[] checkSimpleTermQuery(RelSimpleQuery query)

getIRDoc

public IRDoc getIRDoc(int ranking)
Description copied from interface: Searcher
Before calling this method, one should call the search function.

Specified by:
getIRDoc in interface Searcher
Parameters:
ranking - the position of the ranked documents. The position starts from zero.
Returns:
the retrieved document in the given position

getRankedDocumentList

public java.util.ArrayList getRankedDocumentList()
Specified by:
getRankedDocumentList in interface Searcher
Returns:
all retrieved document in ranked order

getRetrievedDocNum

public int getRetrievedDocNum()
Specified by:
getRetrievedDocNum in interface Searcher
Returns:
the number of retrieved documents

getSmoother

public Smoother getSmoother()
Specified by:
getSmoother in interface Searcher
Returns:
the smoother used for this searcher.

getIndexReader

public IndexReader getIndexReader()
Specified by:
getIndexReader in interface Searcher
Returns:
the index reader the current searcher is working on

getQuery

public IRQuery getQuery()
Specified by:
getQuery in interface Searcher

setQueryWeightingOption

public void setQueryWeightingOption(boolean option)
Description copied from interface: Searcher
If the weighting option is set to false, the searcher ignores the weight of searching terms.

Specified by:
setQueryWeightingOption in interface Searcher
Parameters:
option - the weighting option

getQueryWeightingOption

public boolean getQueryWeightingOption()
Specified by:
getQueryWeightingOption in interface Searcher