org.eaglei.search.provider.lucene
Class LuceneSearchProviderIndexer
java.lang.Object
org.eaglei.search.provider.lucene.LuceneSearchProviderIndexer
public class LuceneSearchProviderIndexer
- extends java.lang.Object
Creates a Lucene index for eagle-i resource data.
A lucene document is created for each resource with the following fields:
- uri: The unique URI of the resource. Stored and indexed but not analyzed.
- : The value for each object and datatype property is stored in a multi-valued field using
the property URI. Stored and indexed. Data type properties are analyzed. Object properties
are not analyzed.
- pref_text: Multi-valued field that holds the lexical form of all preferred datatype properties.
A boost is given to this field. Stored, indexed and analyzed.
- text: Multi-valued field that holds the lexical form of non-preferred datatype properties. Stored, indexed and analyzed.
- resourceFlag: Field that holds a boolean value indicating whether the resource is an eagle-i resource
(i.e. subclass of a top-level resource) or an instance of a non-resource class (e.g. technique).
Stored and indexed but not analyzed.
- inferredType: Multi-valued field that holds the URIs of all inferred classes.
Stored and indexed but not analyzed.
- related: Multi-valued field that holds the URIs of all object properties.
Stored and indexed but not analyzed.
- institution_uri: Holds the URI of the institution. Stored and indexed but not analyzed.
- institution_label: Holds the name of the institution. Stored, indexed and analyzed.
- Author:
- frost
|
Constructor Summary |
LuceneSearchProviderIndexer(org.eaglei.model.EIOntModel eagleiOntModel,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
|
|
Method Summary |
void |
commit()
Commits any pending changes the changes |
org.apache.lucene.index.IndexWriter |
getIndexWriter()
Retrieves the IndexWriter |
void |
indexSearchResult(org.eaglei.search.provider.SearchResult result,
boolean materializeTypes)
Indexes the specified SearchResult. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URI
public static final java.lang.String URI
- See Also:
- Constant Field Values
PREF_TEXT
public static final java.lang.String PREF_TEXT
- See Also:
- Constant Field Values
TEXT
public static final java.lang.String TEXT
- See Also:
- Constant Field Values
RESOURCE_FLAG
public static final java.lang.String RESOURCE_FLAG
- See Also:
- Constant Field Values
INFERRED_TYPE
public static final java.lang.String INFERRED_TYPE
- See Also:
- Constant Field Values
RELATED
public static final java.lang.String RELATED
- See Also:
- Constant Field Values
INSTITUTION_URI
public static final java.lang.String INSTITUTION_URI
- See Also:
- Constant Field Values
INSTITUTION_LABEL
public static final java.lang.String INSTITUTION_LABEL
- See Also:
- Constant Field Values
LOW_BOOST
public static final float LOW_BOOST
- See Also:
- Constant Field Values
STANDARD_BOOST
public static final float STANDARD_BOOST
- See Also:
- Constant Field Values
MEDIUM_BOOST
public static final float MEDIUM_BOOST
- See Also:
- Constant Field Values
HIGH_BOOST
public static final float HIGH_BOOST
- See Also:
- Constant Field Values
LuceneSearchProviderIndexer
public LuceneSearchProviderIndexer(org.eaglei.model.EIOntModel eagleiOntModel,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
throws java.io.IOException
- Throws:
java.io.IOException
getIndexWriter
public org.apache.lucene.index.IndexWriter getIndexWriter()
- Retrieves the IndexWriter
- Returns:
commit
public void commit()
throws java.io.IOException
- Commits any pending changes the changes
- Throws:
java.io.IOException
indexSearchResult
public void indexSearchResult(org.eaglei.search.provider.SearchResult result,
boolean materializeTypes)
throws java.io.IOException
- Indexes the specified SearchResult.
- Parameters:
result - SearchResultmaterializeTypes - True if the types should be materialized.
- Throws:
java.io.IOException - Thrown if an error is encountered indexing the result
Copyright © 2009-2010 Eagle-I. All Rights Reserved.