ERIndex Class Reference

Inherited by ERAttributeIndex, and ERAutoIndex.

Collaboration diagram for ERIndex:

Collaboration graph
[legend]

List of all members.

Classes

class  Command
class  IndexAttribute
class  IndexDocument
class  Job
class  Transaction
class  TransactionHandler

Public Member Functions

void addAttribute (String propertyName, NSDictionary propertyDefinition)
void addObjectsToIndex (EOEditingContext ec, NSArray<?extends EOEnterpriseObject > objects)
NSArray< StringattributeNames ()
void clear ()
IndexDocument createDocumentForGlobalID (EOKeyGlobalID globalID)
void deleteObjectsFromIndex (EOEditingContext ec, NSArray<?extends EOEnterpriseObject > objects)
IndexDocument documentForGlobalID (EOKeyGlobalID globalID)
ERDocument documentForId (int docId, float score)
IndexDocument findDocument (EOKeyGlobalID globalID)
NSArray< EOKeyGlobalID > findGlobalIDs (EOQualifier qualifier)
NSArray< EOKeyGlobalID > findGlobalIDs (String queryString)
Hits findHits (Query query)
NSArray<?extends
EOEnterpriseObject > 
findObjects (EOEditingContext ec, String queryString)
NSArray<?extends
EOEnterpriseObject > 
findObjects (EOEditingContext ec, EOQualifier qualifier)
NSArray<?extends
EOEnterpriseObject > 
findObjects (EOEditingContext ec, Query query)
NSArray<?extends
EOEnterpriseObject > 
findObjects (EOEditingContext ec, Query query, Filter filter, Sort sort, int start, int end)
ScoreDoc[] findScoreDocs (Query query, int hitsPerPage)
NSArray< Term > findTerms (Query q)
NSArray< StringfindTermStrings (Query q)
NSArray< StringfindTermStringsForPrefix (String field, String prefix)
IndexSearcher indexSearcher () throws CorruptIndexException, IOException
String name ()
NSArray< Stringterms (String fieldName)

Static Public Member Functions

static ERIndex indexNamed (String key)

Static Public Attributes

static String IndexingEndedNotification = "ERIndexingEndedNotification"
static String IndexingFailedNotification = "ERIndexingFailedNotification"
static String IndexingStartedNotification = "ERIndexingStartedNotification"

Protected Member Functions

NSArray< Document > addedDocumentsForObjects (NSArray<?extends EOEnterpriseObject > objects)
Analyzer analyzer ()
IndexAttribute attributeNamed (String fieldName)
IndexAttribute createAttribute (String propertyName, NSDictionary propertyDefinition)
Document createDocumentForObject (EOEnterpriseObject eo)
Term createTerm (EOEnterpriseObject eo)
NSArray< Term > deletedTermsForObjects (NSArray<?extends EOEnterpriseObject > objects)
 ERIndex (String name)
TransactionHandler handler ()
boolean handlesObject (EOEnterpriseObject eo)
void setStore (String store)
void setTransactionHandler (TransactionHandler handler)

Protected Attributes

Logger log

Static Protected Attributes

static final String KEY = "ERIndexing"

Private Member Functions

NSArray< IndexAttributeattributes ()
NSArray< EOKeyGlobalID > findGlobalIDs (Query query)
NSArray< EOKeyGlobalID > findGlobalIDs (Query query, Filter filter, Sort sort, int start, int end)
String gidStringForObject (EOEnterpriseObject eo)
Directory indexDirectory ()
IndexReader indexReader () throws CorruptIndexException, IOException
EOEnterpriseObject objectForGidString (EOEditingContext ec, String gidString)
Query queryForQualifier (EOQualifier qualifier) throws ParseException
Query queryForString (String queryString) throws ParseException
Query queryForString (String fieldName, String queryString) throws ParseException

Private Attributes

NSDictionary< String,
IndexAttribute
_attributes = NSDictionary.EmptyDictionary
TransactionHandler _handler
Directory _indexDirectory
final String _name
IndexReader _reader
IndexSearcher _searcher
String _store

Static Private Attributes

static final String GID = "EOGlobalID"
static NSMutableDictionary
< String, ERIndex
indices = ERXMutableDictionary.synchronizedDictionary()


Constructor & Destructor Documentation

ERIndex ( String  name  )  [protected]


Member Function Documentation

void addAttribute ( String  propertyName,
NSDictionary  propertyDefinition 
)

NSArray<Document> addedDocumentsForObjects ( NSArray<?extends EOEnterpriseObject >  objects  )  [protected]

void addObjectsToIndex ( EOEditingContext  ec,
NSArray<?extends EOEnterpriseObject >  objects 
)

Analyzer analyzer (  )  [protected]

IndexAttribute attributeNamed ( String  fieldName  )  [protected]

NSArray<String> attributeNames (  ) 

NSArray<IndexAttribute> attributes (  )  [private]

void clear (  ) 

IndexAttribute createAttribute ( String  propertyName,
NSDictionary  propertyDefinition 
) [protected]

Creates a new IndexAttribute and adds it to the attributes dictionary of this Index

Parameters:
propertyName 
propertyDefinition 
Returns:
the new IndexAttribute

IndexDocument createDocumentForGlobalID ( EOKeyGlobalID  globalID  ) 

Document createDocumentForObject ( EOEnterpriseObject  eo  )  [protected]

Term createTerm ( EOEnterpriseObject  eo  )  [protected]

NSArray<Term> deletedTermsForObjects ( NSArray<?extends EOEnterpriseObject >  objects  )  [protected]

void deleteObjectsFromIndex ( EOEditingContext  ec,
NSArray<?extends EOEnterpriseObject >  objects 
)

IndexDocument documentForGlobalID ( EOKeyGlobalID  globalID  ) 

ERDocument documentForId ( int  docId,
float  score 
)

IndexDocument findDocument ( EOKeyGlobalID  globalID  ) 

NSArray<EOKeyGlobalID> findGlobalIDs ( EOQualifier  qualifier  ) 

NSArray<EOKeyGlobalID> findGlobalIDs ( String  queryString  ) 

NSArray<EOKeyGlobalID> findGlobalIDs ( Query  query  )  [private]

NSArray<EOKeyGlobalID> findGlobalIDs ( Query  query,
Filter  filter,
Sort  sort,
int  start,
int  end 
) [private]

Hits findHits ( Query  query  ) 

NSArray<? extends EOEnterpriseObject> findObjects ( EOEditingContext  ec,
String  queryString 
)

NSArray<? extends EOEnterpriseObject> findObjects ( EOEditingContext  ec,
EOQualifier  qualifier 
)

NSArray<? extends EOEnterpriseObject> findObjects ( EOEditingContext  ec,
Query  query 
)

NSArray<? extends EOEnterpriseObject> findObjects ( EOEditingContext  ec,
Query  query,
Filter  filter,
Sort  sort,
int  start,
int  end 
)

ScoreDoc [] findScoreDocs ( Query  query,
int  hitsPerPage 
)

NSArray<Term> findTerms ( Query  q  ) 

NSArray<String> findTermStrings ( Query  q  ) 

NSArray<String> findTermStringsForPrefix ( String  field,
String  prefix 
)

String gidStringForObject ( EOEnterpriseObject  eo  )  [private]

TransactionHandler handler (  )  [protected]

boolean handlesObject ( EOEnterpriseObject  eo  )  [protected]

Reimplemented in ERAutoIndex.

Directory indexDirectory (  )  [private]

static ERIndex indexNamed ( String  key  )  [static]

Reimplemented in ERAttributeIndex.

IndexReader indexReader (  )  throws CorruptIndexException, IOException [private]

IndexSearcher indexSearcher (  )  throws CorruptIndexException, IOException

String name (  ) 

EOEnterpriseObject objectForGidString ( EOEditingContext  ec,
String  gidString 
) [private]

Query queryForQualifier ( EOQualifier  qualifier  )  throws ParseException [private]

Query queryForString ( String  queryString  )  throws ParseException [private]

Query queryForString ( String  fieldName,
String  queryString 
) throws ParseException [private]

void setStore ( String  store  )  [protected]

void setTransactionHandler ( TransactionHandler  handler  )  [protected]

NSArray<String> terms ( String  fieldName  ) 


Member Data Documentation

NSDictionary<String, IndexAttribute> _attributes = NSDictionary.EmptyDictionary [private]

Directory _indexDirectory [private]

final String _name [private]

IndexReader _reader [private]

IndexSearcher _searcher [private]

String _store [private]

final String GID = "EOGlobalID" [static, private]

String IndexingEndedNotification = "ERIndexingEndedNotification" [static]

String IndexingFailedNotification = "ERIndexingFailedNotification" [static]

String IndexingStartedNotification = "ERIndexingStartedNotification" [static]

NSMutableDictionary<String, ERIndex> indices = ERXMutableDictionary.synchronizedDictionary() [static, private]

final String KEY = "ERIndexing" [static, protected]

Logger log [protected]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:20 2012 for Project Wonder by  doxygen 1.5.8