|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eaglei.search.provider.lucene.LuceneSearchProviderIndexer
public class LuceneSearchProviderIndexer
Creates a Lucene index for eagle-i RDF resource data. A Lucene document is created for each resource. Each document contains the following field corresponding to the direct resource data type and object properties as well as fields corresponding to indirect relationships: inferred types and textual descriptions of resource related by object properties.
| Field Summary | |
|---|---|
static float |
HIGH_BOOST
|
protected static boolean |
INDEX_OBJECT_PROP_LABELS
Flag that controls whether the preferred labels of object properties are indexed/updated |
static java.lang.String |
INFERRED_TYPE
|
static java.lang.String |
INSTITUTION_LABEL
|
static java.lang.String |
INSTITUTION_URI
|
static float |
LOW_BOOST
|
static float |
MEDIUM_BOOST
|
static java.lang.String |
OBJECT_URI_POSTFIX
|
static java.lang.String |
PREF_TEXT
|
static java.lang.String |
RELATED
|
static java.lang.String |
RESOURCE_FLAG
|
static float |
STANDARD_BOOST
|
static java.lang.String |
TEXT
|
static java.lang.String |
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 |
addIndirectProperties(org.eaglei.model.EIURI uri)
Updates the document with the specified URI to add object property labels. |
void |
commit()
Commits any pending changes the changes |
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 this document via an object property. |
void |
indexSearchResult(org.eaglei.search.provider.SearchResult result,
boolean materializeTypes)
Indexes the specified SearchResult. |
protected static boolean |
isDeletedSearchResult(org.eaglei.search.provider.SearchResult result)
Checks if this SearchResult represents a deleted resource. |
protected static java.lang.String |
stripObjectURIPostfix(java.lang.String fieldWithPostfix)
Removes the _uri postfix from the document field name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final boolean INDEX_OBJECT_PROP_LABELS
public static final java.lang.String URI
public static final java.lang.String PREF_TEXT
public static final java.lang.String TEXT
public static final java.lang.String OBJECT_URI_POSTFIX
public static final java.lang.String RESOURCE_FLAG
public static final java.lang.String INFERRED_TYPE
public static final java.lang.String RELATED
public static final java.lang.String INSTITUTION_URI
public static final java.lang.String INSTITUTION_LABEL
public static final float LOW_BOOST
public static final float STANDARD_BOOST
public static final float MEDIUM_BOOST
public static final float HIGH_BOOST
| 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.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.IOExceptionprotected static java.lang.String stripObjectURIPostfix(java.lang.String fieldWithPostfix)
fieldWithPostfix - Field with the _uri postfix
public void addIndirectProperties(org.eaglei.model.EIURI uri)
throws java.io.IOException
uri -
java.io.IOExceptionprotected static boolean isDeletedSearchResult(org.eaglei.search.provider.SearchResult result)
public void indexSearchResult(org.eaglei.search.provider.SearchResult 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||