|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eaglei.search.provider.lucene.LuceneSearchIndexSchema
org.eaglei.search.provider.lucene.LuceneSearchProviderIndexer
public final class LuceneSearchProviderIndexer
Creates a Lucene index for eagle-i RDF resource data according to the schema defined in LuceneSearchIndexSchema.
| Field Summary |
|---|
| Fields inherited from class org.eaglei.search.provider.lucene.LuceneSearchIndexSchema |
|---|
HIGH_BOOST, HIGHEST_BOOST, INDEX_OBJECT_PROP_LABELS, INFERRED_TYPE, INSTITUTION_LABEL, INSTITUTION_URI, LOW_BOOST, MEDIUM_BOOST, OBJECT_URI_POSTFIX, PREF_TEXT, RELATED, RESOURCE_FLAG, STANDARD_BOOST, TEXT, URI |
| Constructor Summary | |
|---|---|
LuceneSearchProviderIndexer(org.eaglei.model.EIOntModel eagleiOntModel,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
Creates the LuceneSearchProviderIndexer |
|
| Method Summary | |
|---|---|
void |
commit()
Commits any pending changes the changes |
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
|
org.apache.lucene.store.Directory |
getDirectory()
|
org.apache.lucene.document.Document |
getDocumentByURI(org.eaglei.model.EIURI uri)
|
org.apache.lucene.index.IndexWriter |
getIndexWriter()
Retrieves the IndexWriter |
java.util.List<org.eaglei.model.EIURI> |
getRelatedDocuments(org.eaglei.model.EIURI uri)
Gets the EIURIs of all documents that reference the specified document via an object property. |
long |
getUpdateFrequency()
|
void |
indexProperties(org.eaglei.search.events.ChangeEventPayloadItem result,
org.apache.lucene.document.Document doc)
Index the data type and object properties for a given search result and document. |
void |
indexSearchResult(org.eaglei.search.events.ChangeEventPayloadItem result,
boolean materializeTypes)
Indexes the specified SearchResult. |
protected static boolean |
isDeletedSearchResult(org.eaglei.search.events.ChangeEventPayloadItem result)
Checks if this SearchResult represents a deleted resource. |
void |
processIndexChangeEvent(org.eaglei.search.events.IndexChangeEvent e)
|
void |
setUpdateFrequency(long updateFrequency)
Sets the frequency for updating the lucene index from the embedded provider. |
protected static java.lang.String |
stripObjectURIPostfix(java.lang.String fieldWithPostfix)
Removes the _uri postfix from the document field name. |
void |
updateIndex(org.eaglei.search.provider.SearchResultSet resultSet)
|
| Methods inherited from class org.eaglei.search.provider.lucene.LuceneSearchIndexSchema |
|---|
isLabProperty, isPropertyField |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LuceneSearchProviderIndexer(org.eaglei.model.EIOntModel eagleiOntModel,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
throws java.io.IOException
eagleiOntModel - Referenced to the eagle-i ontologyanalyzer - The Lucene analyzer that is used for indexing and searching.directory - The directory that holds the index.
java.io.IOException - Thrown if an error is encountered.| Method Detail |
|---|
public org.apache.lucene.analysis.Analyzer getAnalyzer()
public org.apache.lucene.store.Directory getDirectory()
public void setUpdateFrequency(long updateFrequency)
updateFrequency - Update frequency in msec.public long getUpdateFrequency()
setUpdateFrequency(long)public org.apache.lucene.index.IndexWriter getIndexWriter()
public void commit()
throws java.io.IOException
java.io.IOException
public java.util.List<org.eaglei.model.EIURI> getRelatedDocuments(org.eaglei.model.EIURI uri)
throws java.io.IOException
uri - URI of property whose referencing documents are being retrieved.
java.io.IOException - Thrown if an error is encountered executing the queryprotected static java.lang.String stripObjectURIPostfix(java.lang.String fieldWithPostfix)
fieldWithPostfix - Field with the _uri postfix
public org.apache.lucene.document.Document getDocumentByURI(org.eaglei.model.EIURI uri)
throws java.io.IOException
java.io.IOExceptionprotected static boolean isDeletedSearchResult(org.eaglei.search.events.ChangeEventPayloadItem result)
public void processIndexChangeEvent(org.eaglei.search.events.IndexChangeEvent e)
throws java.io.IOException
processIndexChangeEvent in interface org.eaglei.search.events.IndexChangeProcessorjava.io.IOException
public void indexSearchResult(org.eaglei.search.events.ChangeEventPayloadItem result,
boolean materializeTypes)
throws java.io.IOException
result - SearchResultmaterializeTypes - True if the types should be materialized.
java.io.IOException - Thrown if an error is encountered indexing the result
public void indexProperties(org.eaglei.search.events.ChangeEventPayloadItem result,
org.apache.lucene.document.Document doc)
result - SearchResultdoc - Document
public void updateIndex(org.eaglei.search.provider.SearchResultSet resultSet)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||