public class ERIndex extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ERIndex.Command |
protected class |
ERIndex.IndexAttribute |
class |
ERIndex.IndexDocument |
protected class |
ERIndex.Job |
protected class |
ERIndex.Transaction |
protected class |
ERIndex.TransactionHandler |
Modifier and Type | Field and Description |
---|---|
static String |
IndexingEndedNotification |
static String |
IndexingFailedNotification |
static String |
IndexingStartedNotification |
protected static String |
KEY |
protected Logger |
log |
Modifier | Constructor and Description |
---|---|
protected |
ERIndex(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String propertyName,
NSDictionary propertyDefinition) |
protected NSArray<org.apache.lucene.document.Document> |
addedDocumentsForObjects(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects) |
void |
addObjectsToIndex(com.webobjects.eocontrol.EOEditingContext ec,
NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects) |
protected org.apache.lucene.analysis.Analyzer |
analyzer() |
protected ERIndex.IndexAttribute |
attributeNamed(String fieldName) |
NSArray<String> |
attributeNames() |
void |
clear() |
protected ERIndex.IndexAttribute |
createAttribute(String propertyName,
NSDictionary propertyDefinition)
Creates a new
ERIndex.IndexAttribute and adds it to the attributes dictionary of this Index |
ERIndex.IndexDocument |
createDocumentForGlobalID(com.webobjects.eocontrol.EOKeyGlobalID globalID) |
protected org.apache.lucene.document.Document |
createDocumentForObject(com.webobjects.eocontrol.EOEnterpriseObject eo) |
protected org.apache.lucene.index.Term |
createTerm(com.webobjects.eocontrol.EOEnterpriseObject eo) |
protected NSArray<org.apache.lucene.index.Term> |
deletedTermsForObjects(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects) |
void |
deleteObjectsFromIndex(com.webobjects.eocontrol.EOEditingContext ec,
NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects) |
ERIndex.IndexDocument |
documentForGlobalID(com.webobjects.eocontrol.EOKeyGlobalID globalID) |
ERDocument |
documentForId(int docId,
float score) |
ERIndex.IndexDocument |
findDocument(com.webobjects.eocontrol.EOKeyGlobalID globalID) |
NSArray<com.webobjects.eocontrol.EOKeyGlobalID> |
findGlobalIDs(com.webobjects.eocontrol.EOQualifier qualifier) |
NSArray<com.webobjects.eocontrol.EOKeyGlobalID> |
findGlobalIDs(String queryString) |
NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> |
findObjects(com.webobjects.eocontrol.EOEditingContext ec,
com.webobjects.eocontrol.EOQualifier qualifier) |
NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> |
findObjects(com.webobjects.eocontrol.EOEditingContext ec,
org.apache.lucene.search.Query query) |
NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> |
findObjects(com.webobjects.eocontrol.EOEditingContext ec,
org.apache.lucene.search.Query query,
org.apache.lucene.search.Filter filter,
org.apache.lucene.search.Sort sort,
int start,
int end) |
NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> |
findObjects(com.webobjects.eocontrol.EOEditingContext ec,
String queryString) |
org.apache.lucene.search.ScoreDoc[] |
findScoreDocs(org.apache.lucene.search.Query query,
int hitsPerPage) |
NSArray<String> |
findTermStringsForPrefix(String field,
String prefix) |
protected ERIndex.TransactionHandler |
handler() |
protected boolean |
handlesObject(com.webobjects.eocontrol.EOEnterpriseObject eo) |
static ERIndex |
indexNamed(String key) |
org.apache.lucene.search.IndexSearcher |
indexSearcher() |
String |
name() |
protected void |
setStore(String store) |
protected void |
setTransactionHandler(ERIndex.TransactionHandler handler) |
NSArray<String> |
terms(String fieldName) |
protected Logger log
public static String IndexingStartedNotification
public static String IndexingEndedNotification
public static String IndexingFailedNotification
protected static final String KEY
protected ERIndex(String name)
public void addObjectsToIndex(com.webobjects.eocontrol.EOEditingContext ec, NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects)
public void deleteObjectsFromIndex(com.webobjects.eocontrol.EOEditingContext ec, NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects)
protected ERIndex.TransactionHandler handler()
protected void setTransactionHandler(ERIndex.TransactionHandler handler)
protected void setStore(String store)
protected org.apache.lucene.analysis.Analyzer analyzer()
public void addAttribute(String propertyName, NSDictionary propertyDefinition)
protected ERIndex.IndexAttribute createAttribute(String propertyName, NSDictionary propertyDefinition)
ERIndex.IndexAttribute
and adds it to the attributes dictionary of this IndexpropertyName
- propertyDefinition
- ERIndex.IndexAttribute
public org.apache.lucene.search.IndexSearcher indexSearcher() throws org.apache.lucene.index.CorruptIndexException, IOException
org.apache.lucene.index.CorruptIndexException
IOException
public String name()
public void clear()
protected ERIndex.IndexAttribute attributeNamed(String fieldName)
protected boolean handlesObject(com.webobjects.eocontrol.EOEnterpriseObject eo)
protected NSArray<org.apache.lucene.document.Document> addedDocumentsForObjects(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects)
protected org.apache.lucene.document.Document createDocumentForObject(com.webobjects.eocontrol.EOEnterpriseObject eo)
protected NSArray<org.apache.lucene.index.Term> deletedTermsForObjects(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects)
protected org.apache.lucene.index.Term createTerm(com.webobjects.eocontrol.EOEnterpriseObject eo)
public NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> findObjects(com.webobjects.eocontrol.EOEditingContext ec, org.apache.lucene.search.Query query, org.apache.lucene.search.Filter filter, org.apache.lucene.search.Sort sort, int start, int end)
public NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> findObjects(com.webobjects.eocontrol.EOEditingContext ec, org.apache.lucene.search.Query query)
public NSArray<com.webobjects.eocontrol.EOKeyGlobalID> findGlobalIDs(String queryString)
public NSArray<com.webobjects.eocontrol.EOKeyGlobalID> findGlobalIDs(com.webobjects.eocontrol.EOQualifier qualifier)
public org.apache.lucene.search.ScoreDoc[] findScoreDocs(org.apache.lucene.search.Query query, int hitsPerPage)
public NSArray<String> findTermStringsForPrefix(String field, String prefix)
public ERIndex.IndexDocument findDocument(com.webobjects.eocontrol.EOKeyGlobalID globalID)
public ERDocument documentForId(int docId, float score)
public NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> findObjects(com.webobjects.eocontrol.EOEditingContext ec, com.webobjects.eocontrol.EOQualifier qualifier)
public NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> findObjects(com.webobjects.eocontrol.EOEditingContext ec, String queryString)
public ERIndex.IndexDocument documentForGlobalID(com.webobjects.eocontrol.EOKeyGlobalID globalID)
public ERIndex.IndexDocument createDocumentForGlobalID(com.webobjects.eocontrol.EOKeyGlobalID globalID)
Copyright © 2002 – 2020 Project Wonder.