org.galagosearch.core.retrieval.structured
Class ExtentInsideIterator

java.lang.Object
  extended by org.galagosearch.core.retrieval.structured.CountIterator
      extended by org.galagosearch.core.retrieval.structured.ExtentIterator
          extended by org.galagosearch.core.retrieval.structured.ExtentConjunctionIterator
              extended by org.galagosearch.core.retrieval.structured.ExtentInsideIterator
All Implemented Interfaces:
java.lang.Comparable<CountIterator>, StructuredIterator

public class ExtentInsideIterator
extends ExtentConjunctionIterator

Implements the #inside operator. The #inside operator is usually implicit in the query language, where a.b is equivalent to #inside(a b). This is usually used to find terms that occur in fields. For example, #1(bruce croft).author, which finds instances of "bruce croft" occurring in the author field of a document.

Author:
trevor

Field Summary
 
Fields inherited from class org.galagosearch.core.retrieval.structured.ExtentConjunctionIterator
document, done, extentIterators, extents
 
Constructor Summary
ExtentInsideIterator(org.galagosearch.tupleflow.Parameters parameters, ExtentIterator innerIterator, ExtentIterator outerIterator)
          Constructs an #inside instance.
 
Method Summary
 void loadExtents()
          This method is called whenever the ExtentConjunctionIterator has verified that both the inner and outer iterators match this document.
 
Methods inherited from class org.galagosearch.core.retrieval.structured.ExtentConjunctionIterator
count, document, extents, findDocument, isDone, nextDocument, reset
 
Methods inherited from class org.galagosearch.core.retrieval.structured.ExtentIterator
skipToDocument
 
Methods inherited from class org.galagosearch.core.retrieval.structured.CountIterator
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtentInsideIterator

public ExtentInsideIterator(org.galagosearch.tupleflow.Parameters parameters,
                            ExtentIterator innerIterator,
                            ExtentIterator outerIterator)
                     throws java.io.IOException

Constructs an #inside instance. For #inside(a b), this produces an extent whenever a is found inside b.

For example, in the expression #inside(#1(white house) #extents:title()), #1(white house) is the inner iterator and #extents:title() is the outer iterator. Whenever #1(white house) is found in the title of a document, this is a match. The extent for #1(white house) is returned (not the extent for #extents:title() that surrounds it).

Parameters:
parameters - extra parameters, not used for anything.
innerIterator - The source of extents that must be inside.
outerIterator - The source of extents that must contain the inner extents.
Throws:
java.io.IOException
Method Detail

loadExtents

public void loadExtents()
This method is called whenever the ExtentConjunctionIterator has verified that both the inner and outer iterators match this document. This method's job is to find all matchin extents within the document, if they exist.

Specified by:
loadExtents in class ExtentConjunctionIterator


Copyright © 2009. All Rights Reserved.