Class LuceneDocument
java.lang.Object
org.eclipse.rdf4j.sail.lucene.impl.LuceneDocument
- All Implemented Interfaces:
SearchDocument
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.LuceneDocument(com.google.common.base.Function<? super String, ? extends org.apache.lucene.spatial.SpatialStrategy> geoStrategyMapper) LuceneDocument(String id, String resourceId, String context, com.google.common.base.Function<? super String, ? extends org.apache.lucene.spatial.SpatialStrategy> geoStrategyMapper) LuceneDocument(org.apache.lucene.document.Document doc, com.google.common.base.Function<? super String, ? extends org.apache.lucene.spatial.SpatialStrategy> geoStrategyMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGeoProperty(String field, String value) voidaddProperty(String name) Adds/creates a new property with the given name.voidaddProperty(String name, String text) Stores and indexes a property in a Document.org.apache.lucene.document.DocumentgetId()getProperty(String name) Returns a set of the property names.booleanhasProperty(String fieldName, String value) Checks whether a field occurs with a specified value in a Document.
-
Constructor Details
-
LuceneDocument
Deprecated, for removal: This API element is subject to removal in a future version.To be removed, no longer used. -
LuceneDocument
public LuceneDocument(com.google.common.base.Function<? super String, ? extends org.apache.lucene.spatial.SpatialStrategy> geoStrategyMapper) -
LuceneDocument
public LuceneDocument(org.apache.lucene.document.Document doc, com.google.common.base.Function<? super String, ? extends org.apache.lucene.spatial.SpatialStrategy> geoStrategyMapper) -
LuceneDocument
-
-
Method Details
-
getDocument
public org.apache.lucene.document.Document getDocument() -
getId
- Specified by:
getIdin interfaceSearchDocument
-
getResource
- Specified by:
getResourcein interfaceSearchDocument
-
getContext
- Specified by:
getContextin interfaceSearchDocument
-
getPropertyNames
Description copied from interface:SearchDocumentReturns a set of the property names.- Specified by:
getPropertyNamesin interfaceSearchDocument
-
addProperty
Description copied from interface:SearchDocumentAdds/creates a new property with the given name.- Specified by:
addPropertyin interfaceSearchDocument
-
addProperty
Stores and indexes a property in a Document. We don't have to recalculate the concatenated text: just add another TEXT field and Lucene will take care of this. Additional advantage: Lucene may be able to handle the invididual strings in a way that may affect e.g. phrase and proximity searches (concatenation basically means loss of information). NOTE: The TEXT_FIELD_NAME has to be stored, see in LuceneSail- Specified by:
addPropertyin interfaceSearchDocument- See Also:
-
hasProperty
Checks whether a field occurs with a specified value in a Document.- Specified by:
hasPropertyin interfaceSearchDocument
-
getProperty
- Specified by:
getPropertyin interfaceSearchDocument
-
addGeoProperty
- Specified by:
addGeoPropertyin interfaceSearchDocument
-