QryIopSyn
index
/bos/usr0/callan/Classes/11-642/2023-F/QryIopSyn.py

The SYN operator for all retrieval models.

 
Classes
       
QryIop.QryIop(Qry.Qry)
QryIopSyn

 
class QryIopSyn(QryIop.QryIop)
    The SYN operator for all retrieval models.
 
 
Method resolution order:
QryIopSyn
QryIop.QryIop
Qry.Qry
builtins.object

Methods defined here:
__init__(self)
Create an empty SYN query node.
evaluate(self)
"
Evaluate the query operator; the result is an internal inverted
list that may be accessed via the internal iterators.
 
throws IOException: Error accessing the Lucene index.

Methods inherited from QryIop.QryIop:
docIteratorAdvancePast(self, docid)
Advance the query operator's internal iterator beyond the
specified document.
 
docid: The document's internal document id.
docIteratorAdvanceTo(self, docid)
Advance the query operator's internal iterator to the specified
document if it exists, or beyond if it doesn't.
 
docid: The document's internal document id.
docIteratorFinish(self)
Advance the query operator's internal iterator beyond the
any possible document.
docIteratorGetMatch(self)
Return the id of the document that the query operator's internal
iterator points to now.  Use docIteratorHasMatch to determine whether
the iterator currently points to a document.  If the iterator
doesn't point to a document, an invalid document id is returned.
 
Returns the internal id of the current document.
docIteratorGetMatchPosting(self)
Return the postings for the document that the docIterator points to
now, or throw an error if the docIterator doesn't point at a document.
Returns a document posting.
docIteratorHasMatch(self, r)
Indicates whether the query has a matching document.
 
r: A retrieval model (that is ignored - it can be null)
Returns True if the query matches a document, otherwise False.
getCtf(self)
Get the collection term frequency (ctf) associated with this
query operator.  It is an error to call this method before the
object's initialize method is called.
 
Returns the collection term frequency (ctf).
getDf(self)
Get the document frequency (df) associated with this query
operator.  It is an error to call this method before the
object's initialize method is called.
 
Returns the document frequency (df).
initialize(self, r)
Initialize the query operator (and its arguments), including any
internal iterators; this method must be called before iteration
can begin.
 
r: A retrieval model (that is ignored)
locIteratorAdvance(self)
Advance the query operator's internal iterator to the
next location.
locIteratorAdvancePast(self, loc)
Advance the query operator's internal iterator beyond the
specified location.
loc: The location to advance beyond.
locIteratorFinish(self)
Advance the query operator's internal iterator beyond
any possible location.
locIteratorGetMatch(self)
Return the document location that the query operator's internal
iterator points to now.  Use locIteratorHasMatch to determine
whether the iterator currently points to a location.  If the
iterator doesn't point to a location, an invalid document
location is returned.
locIteratorHasMatch(self)
Returns true if the query operator's internal iterator currently
points to a location.
Returns True if the iterator currently points to a location.

Data and other attributes inherited from QryIop.QryIop:
INVALID_ITERATOR_INDEX = -1

Methods inherited from Qry.Qry:
__str__(self)
Get a string version of this query operator.  This is a generic
method that works for most query operators.  However, some query
operators (e.g., #NEAR/n or #WEIGHT) may need to override this
method with something more specific.
 
Returns the string version of this query operator.
appendArg(self, q)
Append an argument to the list of query operator arguments.  
 
q: The query argument (query operator) to append.
 
throws: IllegalArgumentException q is an invalid argument
delArg(self, i)
Delete the i'th argument from the list of query operator arguments.
docIteratorClearMatchCache(self)
Clear the docIterator's matching docid cache.  The cache should
be cleared whenever a docIterator is advanced.
docIteratorHasMatchAll(self, r)
An instantiation of docIteratorHasMatch that is true if the
query has a document that matches all query arguments; some
subclasses may choose to use this implementation.  
 
r: The retrieval model that determines what is a match.
 
Returns True if the query matches, otherwise False.
docIteratorHasMatchCache(self)
Returns True if a match is cached, otherwise False.
docIteratorHasMatchFirst(self, r)
An instantiation of docIteratorHasMatch that is true if the
query has a document that matches the first query argument;
some subclasses may choose to use this implementation.
 
r: The retrieval model that determines what is a match.
Returns True if the query matches, otherwise False.
docIteratorHasMatchMin(self, r)
An instantiation of docIteratorHasMatch that is true if the
query has a document that matches at least one query argument;
the match is the smallest docid to match; some subclasses may
choose to use this implementation.
 
r: The retrieval model that determines what is a match
Returns True if the query matches, otherwise False.
docIteratorSetMatchCache(self, docid)
Set the matching docid cache.
 
docid: The internal document id to store in the cache.
getDisplayName(self)
Every operator has a display name that can be used by
toString for debugging or other user feedback.  
 
Returns the query operator's display name.
setDisplayName(self, name)
Every operator must have a display name that can be used by
toString for debugging or other user feedback.  
 
name: The query operator's display name

Data descriptors inherited from Qry.Qry:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from Qry.Qry:
INVALID_DOCID = -1