helma.Search.Index

Object
   |
   +--helma.Search.Index


Instances of this class represent a Lucene search index located in either a directory on disk or in RAM. This class provides various methods for modifying the underlying Lucene index.
Defined in Search.js



Constructor Summary
helma.Search.Index(<org.apache.lucene.store.Directory> directory, <org.apache.lucene.analysis.Analyzer> analyzer)
            Creates a new instance of helma.Search.Index
 
Properties Summary
<static>  Number LOCK_TIMEOUT
          Constant containing the number of milliseconds the index will try to create an IndexModifier or IndexWriter in case it is currently locked.
 
Methods Summary
 void addDocument(<helma.Search.Document> doc)
           Adds a document to the index.
 void addDocuments(<java.util.Hashtable|java.util.Vector|Array> docs, mergeFactor)
           Adds all documents in the passed collection to this index.
 void addIndexes(<org.apache.lucene.store.Directory> dir )
           Merges the indexes passed as argument into this one.
 void close()
           Closes the underlying index directory for future operations.
 Boolean create()
           Creates a new index.
 org.apache.lucene.analysis.Analyer getAnalyzer()
           Returns the analyzer used within this index.
 org.apache.lucene.store.Directory getDirectory()
           Returns the directory the underlying Lucene index is located at.
 Array getFieldNames()
           Returns an array containing all field names in this index.
 org.apache.lucene.index.IndexModifier getModifier(create)
           Returns an IndexModifier instance for adding or deleting documents to resp.
 org.apache.lucene.index.IndexReader getReader()
           Returns an IndexReader instance.
 helma.Search.Searcher getSearcher()
           Returns a searcher for querying this index.
 org.apache.lucene.index.IndexWriter getWriter(create)
           Returns an IndexWriter instance that can be used to add documents to the underlying index or to perform various other modifying operations.
 Boolean isLocked()
           Checks if the index is locked.
 void optimize()
           Optimizes the underlying index.
 Number removeDocument(<String> fieldName, <String> fieldValue)
           Remove those documents from the index whose field-value with the given name matches the passed value argument.
 Array removeDocuments(<String> fieldName, <java.util.Hashtable|java.util.Vector|Array> values)
           Removes all documents whose field with the given name matches the values passed as argument.
 Number size()
           Returns the number of documents in this index.
 void unlock()
           Unlocks the index.
 void updateDocument(<helma.Search.Document> docObj, <String> fieldName)
           Updates the index with the document passed as argument.

Constructor Detail

helma.Search.Index

helma.Search.Index(<org.apache.lucene.store.Directory> directory, <org.apache.lucene.analysis.Analyzer> analyzer)

Properties Detail

LOCK_TIMEOUT

<static> Number LOCK_TIMEOUT

Method Detail

addDocument

void addDocument(<helma.Search.Document> doc)

addDocuments

void addDocuments(<java.util.Hashtable|java.util.Vector|Array> docs, mergeFactor)

addIndexes

void addIndexes(<org.apache.lucene.store.Directory> dir )

close

void close()

create

Boolean create()

getAnalyzer

org.apache.lucene.analysis.Analyer getAnalyzer()

getDirectory

org.apache.lucene.store.Directory getDirectory()

getFieldNames

Array getFieldNames()

getModifier

org.apache.lucene.index.IndexModifier getModifier(create)

getReader

org.apache.lucene.index.IndexReader getReader()

getSearcher

helma.Search.Searcher getSearcher()

getWriter

org.apache.lucene.index.IndexWriter getWriter(create)

isLocked

Boolean isLocked()

optimize

void optimize()

removeDocument

Number removeDocument(<String> fieldName, <String> fieldValue)

removeDocuments

Array removeDocuments(<String> fieldName, <java.util.Hashtable|java.util.Vector|Array> values)

size

Number size()

unlock

void unlock()

updateDocument

void updateDocument(<helma.Search.Document> docObj, <String> fieldName)


Documentation generated by JSDoc on Thu Apr 5 01:59:00 2007