public abstract class AbstractSearchIndex extends Object implements SearchIndex
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxDocs |
protected Set<String> |
wktFields |
| Constructor and Description |
|---|
AbstractSearchIndex() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Literal literal)
Returns whether the provided literal is accepted by the LuceneIndex to be indexed.
|
protected abstract void |
addDocument(SearchDocument doc) |
void |
addDocuments(Resource subject,
List<Statement> statements)
Add a complete Lucene Document based on these statements.
|
void |
addRemoveStatements(Collection<Statement> added,
Collection<Statement> removed)
Add many statements at the same time, remove many statements at the same time.
|
void |
addStatement(Statement statement)
Indexes the specified Statement.
|
protected abstract SearchDocument |
copyDocument(SearchDocument doc) |
protected abstract void |
deleteDocument(SearchDocument doc) |
Collection<BindingSet> |
evaluate(QuerySpec query)
Deprecated.
|
Collection<BindingSet> |
evaluate(SearchQueryEvaluator evaluator) |
protected abstract Iterable<? extends DocumentDistance> |
geoQuery(IRI geoProperty,
org.locationtech.spatial4j.shape.Point p,
IRI units,
double distance,
String distanceVar,
Var context) |
protected abstract Iterable<? extends DocumentResult> |
geoRelationQuery(String relation,
IRI geoProperty,
String wkt,
Var context) |
protected abstract SearchDocument |
getDocument(String id) |
protected abstract Iterable<? extends SearchDocument> |
getDocuments(String resourceId) |
protected Resource |
getResource(SearchDocument document)
Returns the Resource corresponding with the specified Document.
|
protected abstract org.locationtech.spatial4j.context.SpatialContext |
getSpatialContext(String property) |
void |
initialize(Properties parameters) |
boolean |
isGeoField(String fieldName)
Returns true if the given property contains a geometry.
|
protected abstract BulkUpdater |
newBulkUpdate() |
protected abstract SearchDocument |
newDocument(String id,
String resourceId,
String context) |
protected Object |
parseLuceneQueryShape(String property,
String value) |
protected abstract SearchQuery |
parseQuery(String q,
IRI property)
Deprecated.
|
protected org.locationtech.spatial4j.shape.Shape |
parseQueryPoint(String property,
String value) |
protected org.locationtech.spatial4j.shape.Shape |
parseQueryShape(String property,
String value) |
protected abstract Iterable<? extends DocumentScore> |
query(Resource subject,
String q,
IRI property,
boolean highlight) |
void |
removeStatement(Statement statement)
Removes the specified Statement from the indexes.This should be called from within a begin-commit-rollback
block.
|
protected abstract void |
updateDocument(SearchDocument doc) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbegin, beginReading, clear, clearContexts, commit, endReading, rollback, shutDownpublic void initialize(Properties parameters) throws Exception
initialize in interface SearchIndexExceptionprotected abstract org.locationtech.spatial4j.context.SpatialContext getSpatialContext(String property)
public boolean accept(Literal literal)
accept in interface SearchIndexliteral - the literal to be acceptedpublic boolean isGeoField(String fieldName)
SearchIndexisGeoField in interface SearchIndexpublic final void addStatement(Statement statement) throws IOException
addStatement in interface SearchIndexIOExceptionpublic final void removeStatement(Statement statement) throws IOException
SearchIndexremoveStatement in interface SearchIndexIOExceptionpublic final void addRemoveStatements(Collection<Statement> added, Collection<Statement> removed) throws IOException
addRemoveStatements in interface SearchIndexadded - all added statements, can have multiple subjectsremoved - all removed statements, can have multiple subjectsIOExceptionpublic final void addDocuments(Resource subject, List<Statement> statements) throws IOException
addDocuments in interface SearchIndexstatements - the statements that make up the resourceIOException@Deprecated public Collection<BindingSet> evaluate(QuerySpec query) throws SailException
evaluate(SearchQueryEvaluator).evaluate in interface SearchIndexSailExceptionpublic final Collection<BindingSet> evaluate(SearchQueryEvaluator evaluator) throws SailException
evaluate in interface SearchIndexSailExceptionprotected Object parseLuceneQueryShape(String property, String value) throws ParseException, IOException
ParseExceptionIOExceptionprotected org.locationtech.spatial4j.shape.Shape parseQueryShape(String property, String value) throws ParseException
ParseExceptionprotected org.locationtech.spatial4j.shape.Shape parseQueryPoint(String property, String value) throws ParseException
ParseExceptionprotected Resource getResource(SearchDocument document)
protected abstract SearchDocument getDocument(String id) throws IOException
IOExceptionprotected abstract Iterable<? extends SearchDocument> getDocuments(String resourceId) throws IOException
IOExceptionprotected abstract SearchDocument newDocument(String id, String resourceId, String context)
protected abstract SearchDocument copyDocument(SearchDocument doc)
protected abstract void addDocument(SearchDocument doc) throws IOException
IOExceptionprotected abstract void updateDocument(SearchDocument doc) throws IOException
IOExceptionprotected abstract void deleteDocument(SearchDocument doc) throws IOException
IOException@Deprecated protected abstract SearchQuery parseQuery(String q, IRI property) throws MalformedQueryException
MalformedQueryExceptionprotected abstract Iterable<? extends DocumentScore> query(Resource subject, String q, IRI property, boolean highlight) throws MalformedQueryException, IOException
MalformedQueryExceptionIOExceptionprotected abstract Iterable<? extends DocumentDistance> geoQuery(IRI geoProperty, org.locationtech.spatial4j.shape.Point p, IRI units, double distance, String distanceVar, Var context) throws MalformedQueryException, IOException
MalformedQueryExceptionIOExceptionprotected abstract Iterable<? extends DocumentResult> geoRelationQuery(String relation, IRI geoProperty, String wkt, Var context) throws MalformedQueryException, IOException
MalformedQueryExceptionIOExceptionprotected abstract BulkUpdater newBulkUpdate()
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.