Class SolrIndex
java.lang.Object
org.eclipse.rdf4j.sail.lucene.AbstractSearchIndex
org.eclipse.rdf4j.sail.solr.SolrIndex
- All Implemented Interfaces:
SearchIndex
Deprecated, for removal: This API element is subject to removal in a future version.
since 5.3.0. Solr integration is deprecated for removal; use alternative Lucene-backed search
implementations instead.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class AbstractSearchIndex
defaultNumDocs, maxDocs, wktFieldsModifier and TypeFieldDescriptionprotected intprotected int -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated, for removal: This API element is subject to removal in a future version.voidbegin()Deprecated, for removal: This API element is subject to removal in a future version.Begins a transaction.voidclear()Deprecated, for removal: This API element is subject to removal in a future version.Clears the indexes.voidclearContexts(Resource... contexts) Deprecated, for removal: This API element is subject to removal in a future version.This should be called from within a begin-commit-rollback block.voidcommit()Deprecated, for removal: This API element is subject to removal in a future version.Commits any changes done to the LuceneIndex since the last commit.The semantics is synchronous to SailConnection.commit(), i.e. the LuceneIndex should be committed/rolled back whenever the LuceneSailConnection is committed/rolled back.protected SearchDocumentDeprecated, for removal: This API element is subject to removal in a future version.protected com.google.common.base.Function<? super String, ? extends org.locationtech.spatial4j.context.SpatialContext> createSpatialContextMapper(Map<String, String> parameters) Deprecated, for removal: This API element is subject to removal in a future version.protected voidDeprecated, for removal: This API element is subject to removal in a future version.protected Iterable<? extends DocumentDistance> geoQuery(IRI geoProperty, org.locationtech.spatial4j.shape.Point p, IRI units, double distance, String distanceVar, Var contextVar) Deprecated, for removal: This API element is subject to removal in a future version.protected Iterable<? extends DocumentResult> geoRelationQuery(String relation, IRI geoProperty, String wkt, Var contextVar) Deprecated, for removal: This API element is subject to removal in a future version.org.apache.solr.client.solrj.SolrClientDeprecated, for removal: This API element is subject to removal in a future version.protected SearchDocumentgetDocument(String id) Deprecated, for removal: This API element is subject to removal in a future version.Returns a Document representing the specified document ID (combination of resource and context), or null when no such Document exists yet.getDocument(Resource subject, Resource context) Deprecated, for removal: This API element is subject to removal in a future version.Returns a Document representing the specified Resource and Context combination, or null when no such Document exists yet.protected Iterable<? extends SearchDocument> getDocuments(String resourceId) Deprecated, for removal: This API element is subject to removal in a future version.Iterable<? extends SearchDocument> getDocuments(Resource subject) Deprecated, for removal: This API element is subject to removal in a future version.Returns a list of Documents representing the specified Resource (empty when no such Document exists yet).Each document represent a set of statements with the specified Resource as a subject, which are stored in a specific contextgetPropertyFields(Set<String> fields) Deprecated, for removal: This API element is subject to removal in a future version.Filters the given list of fields, retaining all property fields.protected org.locationtech.spatial4j.context.SpatialContextgetSpatialContext(String property) Deprecated, for removal: This API element is subject to removal in a future version.voidinitialize(Properties parameters) Deprecated, for removal: This API element is subject to removal in a future version.protected BulkUpdaterDeprecated, for removal: This API element is subject to removal in a future version.protected SearchDocumentnewDocument(String id, String resourceId, String context) Deprecated, for removal: This API element is subject to removal in a future version.protected org.locationtech.spatial4j.shape.ShapeparseQueryShape(String property, String value) Deprecated, for removal: This API element is subject to removal in a future version.protected Iterable<? extends DocumentScore> Deprecated, for removal: This API element is subject to removal in a future version.Parse the passed query.voidrollback()Deprecated, for removal: This API element is subject to removal in a future version.org.apache.solr.client.solrj.response.QueryResponsesearch(org.apache.solr.client.solrj.SolrQuery query) Deprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query and returns the results as a TopDocs instance.org.apache.solr.client.solrj.response.QueryResponsesearch(org.apache.solr.client.solrj.SolrQuery query, int numDocs) Deprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query and returns the results as a TopDocs instance.org.apache.solr.client.solrj.response.QueryResponseDeprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query only for the given resource.org.apache.solr.client.solrj.response.QueryResponseDeprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query only for the given resource.voidshutDown()Deprecated, for removal: This API element is subject to removal in a future version.protected StringtoWkt(org.locationtech.spatial4j.shape.Shape s) Deprecated, for removal: This API element is subject to removal in a future version.protected voidDeprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class AbstractSearchIndex
accept, addDocuments, addRemoveStatements, addStatement, evaluate, getIndexedTypeMapping, getResource, isGeoField, isIndexedTypeStatement, isTypeFilteringEnabled, isTypeStatement, parseLuceneQueryShape, parseQueryPoint, removeStatementModifier and TypeMethodDescriptionbooleanReturns whether the provided literal is accepted by the LuceneIndex to be indexed.final voidaddDocuments(Resource subject, List<Statement> statements) Add a complete Lucene Document based on these statements.final voidaddRemoveStatements(Collection<Statement> added, Collection<Statement> removed) Add many statements at the same time, remove many statements at the same time.final voidaddStatement(Statement statement) Indexes the specified Statement.final Collection<BindingSet> evaluate(SearchQueryEvaluator evaluator) protected ResourcegetResource(SearchDocument document) Returns the Resource corresponding with the specified Document.booleanisGeoField(String fieldName) Returns true if the given property contains a geometry.booleanisIndexedTypeStatement(Statement statement) Returns true if the given statement is a type statement of the right type, seeLuceneSail.INDEXEDTYPESto use.booleanis theLuceneSail.INDEXEDTYPESparameter set for this index.booleanisTypeStatement(Statement statement) Returns true if the given statement is a type statement, seeLuceneSail.INDEXEDTYPESto use.protected ObjectparseLuceneQueryShape(String property, String value) protected org.locationtech.spatial4j.shape.ShapeparseQueryPoint(String property, String value) final voidremoveStatement(Statement statement) Removes the specified Statement from the indexes.This should be called from within a begin-commit-rollback
-
Field Details
-
SERVER_KEY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
DISTANCE_FIELD
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
SolrIndex
public SolrIndex()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
initialize
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
initializein interfaceSearchIndex- Overrides:
initializein classAbstractSearchIndex- Throws:
Exception
-
createSpatialContextMapper
-
getClient
public org.apache.solr.client.solrj.SolrClient getClient()Deprecated, for removal: This API element is subject to removal in a future version. -
getSpatialContext
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getSpatialContextin classAbstractSearchIndex
-
shutDown
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
getDocument
Deprecated, for removal: This API element is subject to removal in a future version.Returns a Document representing the specified document ID (combination of resource and context), or null when no such Document exists yet.- Specified by:
getDocumentin classAbstractSearchIndex- Parameters:
id-- Returns:
- search document
- Throws:
IOException
-
getDocuments
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getDocumentsin classAbstractSearchIndex- Throws:
IOException
-
newDocument
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
newDocumentin classAbstractSearchIndex
-
copyDocument
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
copyDocumentin classAbstractSearchIndex
-
addDocument
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
addDocumentin classAbstractSearchIndex- Throws:
IOException
-
updateDocument
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
updateDocumentin classAbstractSearchIndex- Throws:
IOException
-
deleteDocument
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deleteDocumentin classAbstractSearchIndex- Throws:
IOException
-
newBulkUpdate
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
newBulkUpdatein classAbstractSearchIndex
-
getDocument
Deprecated, for removal: This API element is subject to removal in a future version.Returns a Document representing the specified Resource and Context combination, or null when no such Document exists yet.- Parameters:
subject-context-- Returns:
- search document
- Throws:
IOException
-
getDocuments
Deprecated, for removal: This API element is subject to removal in a future version.Returns a list of Documents representing the specified Resource (empty when no such Document exists yet).Each document represent a set of statements with the specified Resource as a subject, which are stored in a specific context- Parameters:
subject-- Returns:
- list of documents
- Throws:
IOException
-
getPropertyFields
-
begin
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchIndexBegins a transaction.- Throws:
IOException
-
commit
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchIndexCommits any changes done to the LuceneIndex since the last commit.The semantics is synchronous to SailConnection.commit(), i.e. the LuceneIndex should be committed/rolled back whenever the LuceneSailConnection is committed/rolled back.- Throws:
IOException
-
rollback
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
query
protected Iterable<? extends DocumentScore> query(Resource subject, QuerySpec spec) throws MalformedQueryException, IOException Deprecated, for removal: This API element is subject to removal in a future version.Parse the passed query.- Specified by:
queryin classAbstractSearchIndex- Parameters:
subject-spec- query to process- Returns:
- the parsed query
- Throws:
MalformedQueryExceptionIOExceptionIllegalArgumentException- if the spec contains a multi-param query
-
search
public org.apache.solr.client.solrj.response.QueryResponse search(Resource resource, org.apache.solr.client.solrj.SolrQuery query) throws org.apache.solr.client.solrj.SolrServerException, IOException Deprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query only for the given resource.- Parameters:
resource-query-- Returns:
- response
- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
search
public org.apache.solr.client.solrj.response.QueryResponse search(Resource resource, org.apache.solr.client.solrj.SolrQuery query, int numDocs) throws org.apache.solr.client.solrj.SolrServerException, IOException Deprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query only for the given resource.- Parameters:
resource-query-numDocs-- Returns:
- response
- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
geoQuery
protected Iterable<? extends DocumentDistance> geoQuery(IRI geoProperty, org.locationtech.spatial4j.shape.Point p, IRI units, double distance, String distanceVar, Var contextVar) throws MalformedQueryException, IOException Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
geoQueryin classAbstractSearchIndex- Throws:
MalformedQueryExceptionIOException
-
geoRelationQuery
protected Iterable<? extends DocumentResult> geoRelationQuery(String relation, IRI geoProperty, String wkt, Var contextVar) throws MalformedQueryException, IOException Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
geoRelationQueryin classAbstractSearchIndex- Throws:
MalformedQueryExceptionIOException
-
parseQueryShape
protected org.locationtech.spatial4j.shape.Shape parseQueryShape(String property, String value) throws ParseException Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
parseQueryShapein classAbstractSearchIndex- Throws:
ParseException
-
toWkt
Deprecated, for removal: This API element is subject to removal in a future version. -
search
public org.apache.solr.client.solrj.response.QueryResponse search(org.apache.solr.client.solrj.SolrQuery query) throws org.apache.solr.client.solrj.SolrServerException, IOException Deprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query and returns the results as a TopDocs instance.- Parameters:
query-- Returns:
- query response
- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
search
public org.apache.solr.client.solrj.response.QueryResponse search(org.apache.solr.client.solrj.SolrQuery query, int numDocs) throws org.apache.solr.client.solrj.SolrServerException, IOException Deprecated, for removal: This API element is subject to removal in a future version.Evaluates the given query and returns the results as a TopDocs instance.- Parameters:
query-numDocs-- Returns:
- query response
- Throws:
org.apache.solr.client.solrj.SolrServerExceptionIOException
-
clearContexts
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchIndexThis should be called from within a begin-commit-rollback block.- Parameters:
contexts-- Throws:
IOException
-
clear
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchIndexClears the indexes.- Throws:
IOException
-