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

lemur::retrieval::StructQueryRep Class Reference

Structured query representation. More...

#include <StructQueryRep.hpp>

Inheritance diagram for lemur::retrieval::StructQueryRep:

lemur::api::QueryRep lemur::retrieval::InQueryRep List of all members.

Public Member Functions

 StructQueryRep (const lemur::api::TermQuery &qry, const lemur::api::Index &dbIndex, double dbelief=0)
 Parse the text representation into a structured query rep.

virtual ~StructQueryRep ()
virtual QueryNodetopnode () const
virtual void setTopnode (QueryNode *qn)
 Set the topnode of the query parse tree.


Private Types

typedef QueryNode *(StructQueryRep::* getFunc )(const lemur::api::TermQuery &, const lemur::api::Term *, double)
 pointer to member function for getting a node.


Private Member Functions

QnListgetChildren (const lemur::api::TermQuery &qry, getFunc fn, bool weigh=false)
 Parse the text representation of the children of a query node.

QueryNodegetQryNode (const lemur::api::TermQuery &qry, const lemur::api::Term *tok, double w)
 Parse the text representation of a weighted query node.

QueryNodegetProxQryNode (const lemur::api::TermQuery &qry, const lemur::api::Term *tok, double w=1.0)
 Parse the text representation of a proximity query node.


Private Attributes

QueryNodetopNode
 Top node of the query parse tree.

QueryNodeqStack [100]
 stack of query nodes for parsing nested nodes.

int topqStack
 index of top of qStack.

double dw
 default weight.

const lemur::api::Indexind
 Our index.

int numDocs
 number of docs in collection (reduce calls to docCount.


Detailed Description

Structured query representation.

Converts the textual representation of the structured query into a tree structure of QueryNodes. Constructs the proximity lists and DocInfoLists for the individual nodes, pruning the set of documents that will actually need to be scored.


Member Typedef Documentation

typedef QueryNode*(StructQueryRep::* lemur::retrieval::StructQueryRep::getFunc)(const lemur::api::TermQuery &, const lemur::api::Term *, double) [private]
 

pointer to member function for getting a node.


Constructor & Destructor Documentation

lemur::retrieval::StructQueryRep::StructQueryRep const lemur::api::TermQuery qry,
const lemur::api::Index dbIndex,
double  dbelief = 0
 

Parse the text representation into a structured query rep.

virtual lemur::retrieval::StructQueryRep::~StructQueryRep  )  [inline, virtual]
 


Member Function Documentation

QnList* lemur::retrieval::StructQueryRep::getChildren const lemur::api::TermQuery qry,
getFunc  fn,
bool  weigh = false
[private]
 

Parse the text representation of the children of a query node.

QueryNode* lemur::retrieval::StructQueryRep::getProxQryNode const lemur::api::TermQuery qry,
const lemur::api::Term tok,
double  w = 1.0
[private]
 

Parse the text representation of a proximity query node.

QueryNode* lemur::retrieval::StructQueryRep::getQryNode const lemur::api::TermQuery qry,
const lemur::api::Term tok,
double  w
[private]
 

Parse the text representation of a weighted query node.

virtual void lemur::retrieval::StructQueryRep::setTopnode QueryNode qn  )  [inline, virtual]
 

Set the topnode of the query parse tree.

virtual QueryNode* lemur::retrieval::StructQueryRep::topnode  )  const [inline, virtual]
 

Get the topnode of the query parse tree. maybe this method should return a const object so it can't be deleted but sometimes we want to allow caller to change node's weight.


Member Data Documentation

double lemur::retrieval::StructQueryRep::dw [private]
 

default weight.

const lemur::api::Index& lemur::retrieval::StructQueryRep::ind [private]
 

Our index.

int lemur::retrieval::StructQueryRep::numDocs [private]
 

number of docs in collection (reduce calls to docCount.

QueryNode* lemur::retrieval::StructQueryRep::qStack[100] [private]
 

stack of query nodes for parsing nested nodes.

QueryNode* lemur::retrieval::StructQueryRep::topNode [private]
 

Top node of the query parse tree.

int lemur::retrieval::StructQueryRep::topqStack [private]
 

index of top of qStack.

This is an accident waiting to happen! dmf


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