Class OLuceneSpatialIndexEngineAbstract
java.lang.Object
com.orientechnologies.lucene.engine.OLuceneIndexEngineAbstract
com.orientechnologies.spatial.engine.OLuceneSpatialIndexEngineAbstract
- All Implemented Interfaces:
OLuceneIndexEngine,OBaseIndexEngine,OIndexEngine,OFreezableStorageComponent,OLuceneSpatialIndexContainer
- Direct Known Subclasses:
OLuceneGeoSpatialIndexEngine,OLuceneLegacySpatialIndexEngine
public abstract class OLuceneSpatialIndexEngineAbstract
extends OLuceneIndexEngineAbstract
implements OLuceneSpatialIndexContainer
Created by Enrico Risa on 26/09/15.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.locationtech.spatial4j.context.SpatialContextprotected final OShapeBuilderprotected SpatialQueryBuilderprotected org.apache.lucene.spatial.SpatialStrategyprotected OSpatialStrategyFactoryFields inherited from class com.orientechnologies.lucene.engine.OLuceneIndexEngineAbstract
collectionFields, indexDefinition, KEY, metadata, name, RID, versionFields inherited from interface com.orientechnologies.orient.core.index.engine.OIndexEngine
VERSION -
Constructor Summary
ConstructorsConstructorDescriptionOLuceneSpatialIndexEngineAbstract(OStorage storage, String indexName, int id, OShapeBuilder factory) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.document.DocumentbuildDocument(Object key, OIdentifiable value) org.apache.lucene.search.QuerybuildQuery(Object query) org.apache.lucene.index.IndexWritercreateIndexWriter(org.apache.lucene.store.Directory directory) protected abstract org.apache.lucene.spatial.SpatialStrategycreateSpatialStrategy(OIndexDefinition indexDefinition, ODocument metadata) protected Objectprotected Objectbooleanvoidinit(OIndexMetadata im) iterateEntriesBetween(Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateEntriesMajor(Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateEntriesMinor(Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) protected org.apache.lucene.document.DocumentnewGeoDocument(OIdentifiable oIdentifiable, org.locationtech.spatial4j.shape.Shape shape, ODocument shapeDoc) booleanremove(OAtomicOperation atomicOperation, Object key) booleanremove(OAtomicOperation atomicOperation, Object key, ORID value) org.apache.lucene.spatial.SpatialStrategystrategy()stream(IndexEngineValuesTransformer valuesTransformer) Methods inherited from class com.orientechnologies.lucene.engine.OLuceneIndexEngineAbstract
acquireAtomicExclusiveLock, addDocument, buildTxChanges, clear, close, create, delete, deleteQuery, descStream, flush, freeze, getDatabase, getId, getIndexNameByKey, getName, indexAnalyzer, indexName, isCollectionIndex, load, onRecordAddedToResultSet, openIfClosed, queryAnalyzer, release, release, remove, remove, searcher, size, sizeInTx, updateLastAccessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.index.engine.OBaseIndexEngine
applyTxChanges, getUniqueIndexVersion, hasRidBagTreesSupport, updateUniqueIndexVersionMethods inherited from interface com.orientechnologies.orient.core.index.engine.OIndexEngine
get, getEngineAPIVersion, put, put, update, validatedPutMethods inherited from interface com.orientechnologies.lucene.engine.OLuceneIndexEngine
getInTxMethods inherited from interface com.orientechnologies.spatial.engine.OLuceneSpatialIndexContainer
isLegacy, searcher
-
Field Details
-
factory
-
ctx
protected org.locationtech.spatial4j.context.SpatialContext ctx -
strategy
protected org.apache.lucene.spatial.SpatialStrategy strategy -
strategyFactory
-
queryStrategy
-
-
Constructor Details
-
OLuceneSpatialIndexEngineAbstract
public OLuceneSpatialIndexEngineAbstract(OStorage storage, String indexName, int id, OShapeBuilder factory)
-
-
Method Details
-
init
- Specified by:
initin interfaceOBaseIndexEngine- Overrides:
initin classOLuceneIndexEngineAbstract
-
createSpatialStrategy
protected abstract org.apache.lucene.spatial.SpatialStrategy createSpatialStrategy(OIndexDefinition indexDefinition, ODocument metadata) -
createIndexWriter
public org.apache.lucene.index.IndexWriter createIndexWriter(org.apache.lucene.store.Directory directory) throws IOException - Specified by:
createIndexWriterin classOLuceneIndexEngineAbstract- Throws:
IOException
-
remove
- Specified by:
removein interfaceOBaseIndexEngine- Specified by:
removein interfaceOIndexEngine
-
remove
- Specified by:
removein interfaceOBaseIndexEngine- Specified by:
removein interfaceOIndexEngine
-
iterateEntriesBetween
public Stream<ORawPair<Object,ORID>> iterateEntriesBetween(Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesBetweenin interfaceOBaseIndexEngine
-
iterateEntriesMajor
public Stream<ORawPair<Object,ORID>> iterateEntriesMajor(Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesMajorin interfaceOBaseIndexEngine
-
iterateEntriesMinor
public Stream<ORawPair<Object,ORID>> iterateEntriesMinor(Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesMinorin interfaceOBaseIndexEngine
-
stream
- Specified by:
streamin interfaceOBaseIndexEngine- Overrides:
streamin classOLuceneIndexEngineAbstract
-
keyStream
- Specified by:
keyStreamin interfaceOBaseIndexEngine- Overrides:
keyStreamin classOLuceneIndexEngineAbstract
-
hasRangeQuerySupport
public boolean hasRangeQuerySupport()- Specified by:
hasRangeQuerySupportin interfaceOBaseIndexEngine
-
newGeoDocument
protected org.apache.lucene.document.Document newGeoDocument(OIdentifiable oIdentifiable, org.locationtech.spatial4j.shape.Shape shape, ODocument shapeDoc) -
encodeKey
-
decodeKey
-
buildDocument
- Specified by:
buildDocumentin interfaceOLuceneIndexEngine
-
buildQuery
- Specified by:
buildQueryin interfaceOLuceneIndexEngine
-
strategy
public org.apache.lucene.spatial.SpatialStrategy strategy()- Specified by:
strategyin interfaceOLuceneSpatialIndexContainer
-