org.galagosearch.core.retrieval.structured
Class StructuredRetrieval

java.lang.Object
  extended by org.galagosearch.core.retrieval.Retrieval
      extended by org.galagosearch.core.retrieval.structured.StructuredRetrieval

public class StructuredRetrieval
extends Retrieval

Author:
trevor

Constructor Summary
StructuredRetrieval(java.lang.String filename)
           
StructuredRetrieval(StructuredIndex index)
           
 
Method Summary
 void close()
           
 StructuredIterator createIterator(Node node)
           
 ScoredDocument[] getArrayResults(java.util.PriorityQueue<ScoredDocument> scores)
           
 java.lang.String getDocumentName(int document)
           
 NodeType getNodeType(Node node)
           
 ScoredDocument[] runQuery(Node queryTree, int requested)
          Evaluates a query.
 Node transformQuery(Node queryTree)
          Transforms the query into a more complete representation that can be directly executed.
 
Methods inherited from class org.galagosearch.core.retrieval.Retrieval
instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructuredRetrieval

public StructuredRetrieval(StructuredIndex index)

StructuredRetrieval

public StructuredRetrieval(java.lang.String filename)
                    throws java.io.FileNotFoundException,
                           java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

getArrayResults

public ScoredDocument[] getArrayResults(java.util.PriorityQueue<ScoredDocument> scores)

getNodeType

public NodeType getNodeType(Node node)
                     throws java.lang.Exception
Throws:
java.lang.Exception

createIterator

public StructuredIterator createIterator(Node node)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

transformQuery

public Node transformQuery(Node queryTree)
                    throws java.lang.Exception
Description copied from class: Retrieval
Transforms the query into a more complete representation that can be directly executed.

Specified by:
transformQuery in class Retrieval
Throws:
java.lang.Exception

runQuery

public ScoredDocument[] runQuery(Node queryTree,
                                 int requested)
                          throws java.lang.Exception
Evaluates a query.

Specified by:
runQuery in class Retrieval
Parameters:
queryTree - A query tree that has been already transformed with StructuredRetrieval.transformQuery.
requested - The number of documents to retrieve, at most.
Returns:
Throws:
java.lang.Exception

getDocumentName

public java.lang.String getDocumentName(int document)
Specified by:
getDocumentName in class Retrieval

close

public void close()
           throws java.io.IOException
Specified by:
close in class Retrieval
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.