|  | ## Cheshire3 Object Model: Class SimpleIndex

Module index :: Class SimpleIndex

## Class SimpleIndex
source code

Object Tree:

               object --+
                        |
    configParser.C3Object --+
                            |
            baseObjects.Index --+
                                |
                               SimpleIndex

Known Subclasses:
  ArrayIndex, BitmapIndex, ClusterExtractionIndex, ProximityIndex, RangeIndex, postgres.PostgresIndex

Instance Methods

__init__(self, session, node, parent) The constructor for all Cheshire3 objects take the same arguments: session: A Session object topNode: The <config> or <subConfig> domNode for the configuration parent: The object that provides the scope for this object.
_handleConfigNode(self, session, node)
_mergeHash(self, a, b)
_processChain(self, session, data, process)
_processRecord(self, session, record, source)
begin_indexing(self, session) Perform tasks before indexing any records
commit_indexing(self, session) Perform tasks after records have been indexed
construct_item(self, session, term, rsitype="SimpleResultSetItem") Take a single item, as stored in this Index, and produce a ResultSetItem representation.
construct_resultSet(self, session, terms, queryHash={}) Take a list of terms and produce an appropriate ResultSet object.
delete_record(self, session, record) Delete all the terms of the given record from the indexes.
deserialise_terms(self, data, prox=1) Callback from IndexStore to take serialised data and produce list of terms and document references.
extract_data(self, session, record)
index_record(self, session, record) Accept a record to index.
merge_terms(self, structTerms, newTerms, op="replace", recs=0, occs=0) Callback from IndexStore to take two sets of terms and merge them together.
scan(self, session, value, numReq, direction=">=") Produce an ordered term list with document frequencies and total occurences
search(self, session, clause, db) Search this particular index given a CQL clause, return a resultSet object
serialise_terms(self, termid, terms, recs=0, occs=0) Callback from IndexStore to serialise list of terms and document references to be stored
store_terms(self, session, data, record)
Inherited from `baseObjects.Index`: `sort` Inherited from `configParser.C3Object`: `auth_function`, `get_config`, `get_default`, `get_object`, `get_path`, `get_setting`, `log_function`, `unauth_function`, `unlog_function` Inherited from `configParser.C3Object` (private): `_getDomFromFile`, `_parseIncludes`, `_recurseSubConfigs`, `_verifyDefault`, `_verifyOption`, `_verifySetting` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables

currentFullPath |
currentPath |
debug |
indexingData |
indexingTerm |
sources |
storeOrig |
xPathAllAbsolute |
xPathAttributesRequired |
xPathsNormalized |
Inherited from `baseObjects.Index`: `indexStore` Inherited from `configParser.C3Object`: `configStore`, `defaults`, `functionLogger`, `id`, `name`, `objectType`, `objects`, `parent`, `paths`, `permissionHandlers`, `settings`, `subConfigs`, `unresolvedObjects` Inherited from `configParser.C3Object` (private): `_includeConfigStores`, `_objectRefs` Inherited from `object`: `__class__`

Method Details

### __init__(self, session, node, parent) (Constructor) | source code
The constructor for all Cheshire3 objects take the same arguments: session: A Session object topNode: The <config> or <subConfig> domNode for the configuration parent: The object that provides the scope for this object. Overrides: configParser.C3Object.__init__ (inherited documentation)

### _handleConfigNode(self, session, node) | source code
Overrides: configParser.C3Object._handleConfigNode

### _mergeHash(self, a, b) | source code

### _processChain(self, session, data, process) | source code

### _processRecord(self, session, record, source) | source code

### begin_indexing(self, session) | source code
Perform tasks before indexing any records Overrides: baseObjects.Index.begin_indexing (inherited documentation)

### commit_indexing(self, session) | source code
Perform tasks after records have been indexed Overrides: baseObjects.Index.commit_indexing (inherited documentation)

### construct_item(self, session, term, rsitype="SimpleResultSetItem") | source code
Take a single item, as stored in this Index, and produce a ResultSetItem representation. Overrides: baseObjects.Index.construct_item (inherited documentation)

### construct_resultSet(self, session, terms, queryHash={}) | source code
Take a list of terms and produce an appropriate ResultSet object. Overrides: baseObjects.Index.construct_resultSet (inherited documentation)

### delete_record(self, session, record) | source code
Delete all the terms of the given record from the indexes. Does this by extracting the terms from the record, finding and removing them. Hence the record must be the same as the one that was indexed. Overrides: baseObjects.Index.delete_record (inherited documentation)

### deserialise_terms(self, data, prox=1) | source code
Callback from IndexStore to take serialised data and produce list of terms and document references. Overrides: baseObjects.Index.deserialise_terms (inherited documentation)

### extract_data(self, session, record) | source code

### index_record(self, session, record) | source code
Accept a record to index. If begin indexing has been called, the index might not commit any data until commit_indexing is called. If it is not in batch mode, then index_record will also commit the terms to the indexStore. Overrides: baseObjects.Index.index_record (inherited documentation)

### merge_terms(self, structTerms, newTerms, op="replace", recs=0, occs=0) | source code
Callback from IndexStore to take two sets of terms and merge them together. Overrides: baseObjects.Index.merge_terms (inherited documentation)

### scan(self, session, value, numReq, direction=">=") | source code
Produce an ordered term list with document frequencies and total occurences Overrides: baseObjects.Index.scan (inherited documentation)

### search(self, session, clause, db) | source code
Search this particular index given a CQL clause, return a resultSet object Overrides: baseObjects.Index.search (inherited documentation)

### serialise_terms(self, termid, terms, recs=0, occs=0) | source code
Callback from IndexStore to serialise list of terms and document references to be stored Overrides: baseObjects.Index.serialise_terms (inherited documentation)

### store_terms(self, session, data, record) | source code

Class Variable Details

    ### currentFullPath Value:
        []

    ### currentPath Value:
        []

    ### debug Value:
        0

    ### indexingData Value:
        []

    ### indexingTerm Value:
        ''

    ### sources Value:
        []

    ### storeOrig Value:
        0

    ### xPathAllAbsolute Value:
        1

    ### xPathAttributesRequired Value:
        []

    ### xPathsNormalized Value:
        {}