JavaAsyncSolrClient

io.ino.solrs.JavaAsyncSolrClient
See theJavaAsyncSolrClient companion object
class JavaAsyncSolrClient(val loadBalancer: LoadBalancer, httpClient: AsyncHttpClient, shutdownHttpClient: Boolean, requestInterceptor: Option[RequestInterceptor], requestWriter: RequestWriter, responseParser: ResponseParser, metrics: Metrics, serverStateObservation: Option[ServerStateObservation[[T <: <FromJavaObject>] =>> CompletionStage[T]]], retryPolicy: RetryPolicy) extends AsyncSolrClient[[T <: <FromJavaObject>] =>> CompletionStage[T]]

Java API: Async, non-blocking Solr Client that allows to make requests to Solr. The usage shall be similar to the solrj SolrClient, so request returns a CompletionStage of a SolrResponse.

Example usage:

JavaAsyncSolrClient solr = JavaAsyncSolrClient.create("http://localhost:" + solrRunner.port + "/solr/collection1");
CompletionStage<QueryResponse> response = solr.query(new SolrQuery("*:*"));
response.thenAccept(r -> System.out.println("found "+ r.getResults().getNumFound() +" docs"));

Attributes

Companion
object
Graph
Supertypes
class AsyncSolrClient[[T <: <FromJavaObject>] =>> CompletionStage[T]]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addBean(obj: Any): CompletionStage[UpdateResponse]

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Value parameters

obj

the input bean

Attributes

Returns

an UpdateResponse from the server

def addBean(obj: Any, commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Value parameters

obj

the input bean

Attributes

Returns

an UpdateResponse from the server

def addBean(collection: String, obj: Any): CompletionStage[UpdateResponse]

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Value parameters

collection

to Solr collection to add documents to

obj

the input bean

Attributes

Returns

an UpdateResponse from the server

def addBean(collection: String, obj: Any, commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Value parameters

collection

to Solr collection to add documents to

obj

the input bean

Attributes

Returns

an UpdateResponse from the server

def addBeans(beans: Collection[_]): CompletionStage[UpdateResponse]

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Value parameters

beans

the collection of beans

Attributes

Returns

an UpdateResponse from the server

def addBeans(beans: Collection[_], commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Value parameters

beans

the collection of beans

commitWithinMs

max time (in ms) before a commit will happen

Attributes

Returns

an UpdateResponse from the server

def addBeans(collection: String, beans: Collection[_]): CompletionStage[UpdateResponse]

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Value parameters

beans

the collection of beans

collection

the Solr collection to add documents to

Attributes

Returns

an UpdateResponse from the server

def addBeans(collection: String, beans: Collection[_], commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Value parameters

beans

the collection of beans

collection

the Solr collection to add documents to

commitWithinMs

max time (in ms) before a commit will happen

Attributes

Returns

an UpdateResponse from the server

def addBeans(beanIterator: Iterator[_]): CompletionStage[UpdateResponse]

Adds the beans supplied by the given iterator.

Adds the beans supplied by the given iterator.

Value parameters

beanIterator

the iterator which returns Beans

Attributes

Returns

an UpdateResponse from the server

def addBeans(collection: String, beanIterator: Iterator[_]): CompletionStage[UpdateResponse]

Adds the beans supplied by the given iterator.

Adds the beans supplied by the given iterator.

Value parameters

beanIterator

the iterator which returns Beans

collection

the Solr collection to add the documents to

Attributes

Returns

an UpdateResponse from the server

def addDoc(doc: SolrInputDocument): CompletionStage[UpdateResponse]

Adds a single document specifying max time before it becomes committed

Adds a single document specifying max time before it becomes committed

Value parameters

doc

the input document

Attributes

Returns

an UpdateResponse from the server

def addDoc(doc: SolrInputDocument, commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a single document specifying max time before it becomes committed

Adds a single document specifying max time before it becomes committed

Value parameters

commitWithinMs

max time (in ms) before a commit will happen

doc

the input document

Attributes

Returns

an UpdateResponse from the server

def addDoc(collection: String, doc: SolrInputDocument): CompletionStage[UpdateResponse]

Adds a single document specifying max time before it becomes committed

Adds a single document specifying max time before it becomes committed

Value parameters

collection

the Solr collection to add the document to

doc

the input document

Attributes

Returns

an UpdateResponse from the server

def addDoc(collection: String, doc: SolrInputDocument, commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a single document specifying max time before it becomes committed

Adds a single document specifying max time before it becomes committed

Value parameters

collection

the Solr collection to add the document to

commitWithinMs

max time (in ms) before a commit will happen

doc

the input document

Attributes

Returns

an UpdateResponse from the server

def addDocs(docs: Collection[SolrInputDocument]): CompletionStage[UpdateResponse]

Adds a collection of documents, specifying max time before they become committed

Adds a collection of documents, specifying max time before they become committed

Value parameters

docs

the collection of documents

Attributes

Returns

an UpdateResponse from the server

def addDocs(docs: Collection[SolrInputDocument], commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a collection of documents, specifying max time before they become committed

Adds a collection of documents, specifying max time before they become committed

Value parameters

commitWithinMs

max time (in ms) before a commit will happen

docs

the collection of documents

Attributes

Returns

an UpdateResponse from the server

def addDocs(collection: String, docs: Collection[SolrInputDocument]): CompletionStage[UpdateResponse]

Adds a collection of documents, specifying max time before they become committed

Adds a collection of documents, specifying max time before they become committed

Value parameters

collection

the Solr collection to add documents to

docs

the collection of documents

Attributes

Returns

an UpdateResponse from the server

def addDocs(collection: String, docs: Collection[SolrInputDocument], commitWithinMs: Int): CompletionStage[UpdateResponse]

Adds a collection of documents, specifying max time before they become committed

Adds a collection of documents, specifying max time before they become committed

Value parameters

collection

the Solr collection to add documents to

commitWithinMs

max time (in ms) before a commit will happen

docs

the collection of documents

Attributes

Returns

an UpdateResponse from the server

def addDocs(docIterator: Iterator[SolrInputDocument]): CompletionStage[UpdateResponse]

Adds the documents supplied by the given iterator.

Adds the documents supplied by the given iterator.

Value parameters

docIterator

the iterator which returns SolrInputDocument instances

Attributes

Returns

an UpdateResponse from the server

def addDocs(collection: String, docIterator: Iterator[SolrInputDocument]): CompletionStage[UpdateResponse]

Adds the documents supplied by the given iterator.

Adds the documents supplied by the given iterator.

Value parameters

collection

the Solr collection to add documents to

docIterator

the iterator which returns SolrInputDocument instances

Attributes

Returns

an UpdateResponse from the server

def commit(): CompletionStage[UpdateResponse]

Performs an explicit commit, causing pending documents to be committed for indexing

Performs an explicit commit, causing pending documents to be committed for indexing

Attributes

Returns

an UpdateResponse containing the response from the server

def commit(waitFlush: Boolean, waitSearcher: Boolean): CompletionStage[UpdateResponse]

Performs an explicit commit, causing pending documents to be committed for indexing

Performs an explicit commit, causing pending documents to be committed for indexing

Value parameters

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

def commit(waitFlush: Boolean, waitSearcher: Boolean, softCommit: Boolean): CompletionStage[UpdateResponse]

Performs an explicit commit, causing pending documents to be committed for indexing

Performs an explicit commit, causing pending documents to be committed for indexing

Value parameters

softCommit

makes index changes visible while neither fsync-ing index files nor writing a new index descriptor

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

def commit(collection: String): CompletionStage[UpdateResponse]

Performs an explicit commit, causing pending documents to be committed for indexing

Performs an explicit commit, causing pending documents to be committed for indexing

Value parameters

collection

the Solr collection to send the commit to

Attributes

Returns

an UpdateResponse containing the response from the server

def commit(collection: String, waitFlush: Boolean, waitSearcher: Boolean): CompletionStage[UpdateResponse]

Performs an explicit commit, causing pending documents to be committed for indexing

Performs an explicit commit, causing pending documents to be committed for indexing

Value parameters

collection

the Solr collection to send the commit to

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

def commit(collection: String, waitFlush: Boolean, waitSearcher: Boolean, softCommit: Boolean): CompletionStage[UpdateResponse]

Performs an explicit commit, causing pending documents to be committed for indexing

Performs an explicit commit, causing pending documents to be committed for indexing

Value parameters

collection

the Solr collection to send the commit to

softCommit

makes index changes visible while neither fsync-ing index files nor writing a new index descriptor

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteById(id: String): CompletionStage[UpdateResponse]

Deletes a single document by unique ID, specifying max time before commit

Deletes a single document by unique ID, specifying max time before commit

Value parameters

id

the ID of the document to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteById(id: String, commitWithinMs: Int): CompletionStage[UpdateResponse]

Deletes a single document by unique ID, specifying max time before commit

Deletes a single document by unique ID, specifying max time before commit

Value parameters

commitWithinMs

max time (in ms) before a commit will happen

id

the ID of the document to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteById(collection: String, id: String): CompletionStage[UpdateResponse]

Deletes a single document by unique ID, specifying max time before commit

Deletes a single document by unique ID, specifying max time before commit

Value parameters

collection

the Solr collection to delete the document from

id

the ID of the document to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteById(collection: String, id: String, commitWithinMs: Int): CompletionStage[UpdateResponse]

Deletes a single document by unique ID, specifying max time before commit

Deletes a single document by unique ID, specifying max time before commit

Value parameters

collection

the Solr collection to delete the document from

commitWithinMs

max time (in ms) before a commit will happen

id

the ID of the document to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByIds(ids: List[String]): CompletionStage[UpdateResponse]

Deletes a list of documents by unique ID, specifying max time before commit

Deletes a list of documents by unique ID, specifying max time before commit

Value parameters

ids

the list of document IDs to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByIds(ids: List[String], commitWithinMs: Int): CompletionStage[UpdateResponse]

Deletes a list of documents by unique ID, specifying max time before commit

Deletes a list of documents by unique ID, specifying max time before commit

Value parameters

commitWithinMs

max time (in ms) before a commit will happen

ids

the list of document IDs to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByIds(collection: String, ids: List[String]): CompletionStage[UpdateResponse]

Deletes a list of documents by unique ID, specifying max time before commit

Deletes a list of documents by unique ID, specifying max time before commit

Value parameters

collection

the Solr collection to delete the documents from

ids

the list of document IDs to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByIds(collection: String, ids: List[String], commitWithinMs: Int): CompletionStage[UpdateResponse]

Deletes a list of documents by unique ID, specifying max time before commit

Deletes a list of documents by unique ID, specifying max time before commit

Value parameters

collection

the Solr collection to delete the documents from

commitWithinMs

max time (in ms) before a commit will happen

ids

the list of document IDs to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByQuery(query: String): CompletionStage[UpdateResponse]

Deletes documents from the index based on a query, specifying max time before commit

Deletes documents from the index based on a query, specifying max time before commit

Value parameters

query

the query expressing what documents to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByQuery(query: String, commitWithinMs: Int): CompletionStage[UpdateResponse]

Deletes documents from the index based on a query, specifying max time before commit

Deletes documents from the index based on a query, specifying max time before commit

Value parameters

commitWithinMs

max time (in ms) before a commit will happen

query

the query expressing what documents to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByQuery(collection: String, query: String): CompletionStage[UpdateResponse]

Deletes documents from the index based on a query, specifying max time before commit

Deletes documents from the index based on a query, specifying max time before commit

Value parameters

collection

the Solr collection to delete the documents from

query

the query expressing what documents to delete

Attributes

Returns

an UpdateResponse containing the response from the server

def deleteByQuery(collection: String, query: String, commitWithinMs: Int): CompletionStage[UpdateResponse]

Deletes documents from the index based on a query, specifying max time before commit

Deletes documents from the index based on a query, specifying max time before commit

Value parameters

collection

the Solr collection to delete the documents from

commitWithinMs

max time (in ms) before a commit will happen

query

the query expressing what documents to delete

Attributes

Returns

an UpdateResponse containing the response from the server

override def execute[T <: SolrResponse : SolrResponseFactory](r: SolrRequest[_ <: T]): CompletionStage[T]

Performs a request to a solr server.

Performs a request to a solr server.

Value parameters

r

the request to send to solr.

Attributes

Definition Classes
override def executePreferred[T <: SolrResponse : SolrResponseFactory](r: SolrRequest[_ <: T], preferred: Option[SolrServer]): CompletionStage[(T, SolrServer)]

Performs a request to a solr server taking the preferred server into account if provided.

Performs a request to a solr server taking the preferred server into account if provided.

Value parameters

preferred

the server that should be preferred to process the request. Specific LoadBalancer implementations have to support this and might add their own semantics.

r

the request to send to the solr server.

Attributes

Returns

the response and the server that handled the request.

Definition Classes
def getById(id: String): CompletionStage[Optional[SolrDocument]]

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Value parameters

id

the id

Attributes

Returns

retrieved SolrDocument, or None if no document is found.

def getById(id: String, params: SolrParams): CompletionStage[Optional[SolrDocument]]

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Value parameters

id

the id

params

additional parameters to add to the query

Attributes

Returns

retrieved SolrDocument, or None if no document is found.

def getById(collection: String, id: String): CompletionStage[Optional[SolrDocument]]

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Value parameters

collection

the Solr collection to query

id

the id

Attributes

Returns

retrieved SolrDocument, or None if no document is found.

def getById(collection: String, id: String, params: SolrParams): CompletionStage[Optional[SolrDocument]]

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Value parameters

collection

the Solr collection to query

id

the id

params

additional parameters to add to the query

Attributes

Returns

retrieved SolrDocument, or None if no document is found.

def getByIds(ids: Collection[String]): CompletionStage[SolrDocumentList]

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

If a document was not found, it will not be added to the SolrDocumentList.

Value parameters

ids

the ids

Attributes

Returns

a SolrDocumentList, or null if no documents were found

def getByIds(ids: Collection[String], params: SolrParams): CompletionStage[SolrDocumentList]

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

If a document was not found, it will not be added to the SolrDocumentList.

Value parameters

ids

the ids

params

additional parameters to add to the query

Attributes

Returns

a SolrDocumentList, or null if no documents were found

def getByIds(collection: String, ids: Collection[String]): CompletionStage[SolrDocumentList]

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

If a document was not found, it will not be added to the SolrDocumentList.

Value parameters

collection

the Solr collection to query

ids

the ids

Attributes

Returns

a SolrDocumentList, or null if no documents were found

def getByIds(collection: String, ids: Collection[String], params: SolrParams): CompletionStage[SolrDocumentList]

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

If a document was not found, it will not be added to the SolrDocumentList.

Value parameters

collection

the Solr collection to query

ids

the ids

params

additional parameters to add to the query

Attributes

Returns

a SolrDocumentList, or null if no documents were found

def optimize(): CompletionStage[UpdateResponse]

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Attributes

Returns

an UpdateResponse containing the response from the server

def optimize(waitFlush: Boolean, waitSearcher: Boolean): CompletionStage[UpdateResponse]

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Value parameters

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

def optimize(waitFlush: Boolean, waitSearcher: Boolean, maxSegments: Int): CompletionStage[UpdateResponse]

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Value parameters

maxSegments

optimizes down to at most this number of segments

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

def optimize(collection: String): CompletionStage[UpdateResponse]

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Value parameters

collection

the Solr collection to send the optimize to

Attributes

Returns

an UpdateResponse containing the response from the server

def optimize(collection: String, waitFlush: Boolean, waitSearcher: Boolean): CompletionStage[UpdateResponse]

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Value parameters

collection

the Solr collection to send the optimize to

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

def optimize(collection: String, waitFlush: Boolean, waitSearcher: Boolean, maxSegments: Int): CompletionStage[UpdateResponse]

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Value parameters

collection

the Solr collection to send the optimize to

maxSegments

optimizes down to at most this number of segments

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

override def ping(): CompletionStage[SolrPingResponse]

Issues a ping request to check if the server is alive

Issues a ping request to check if the server is alive

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.SolrPingResponse} containing the response from the server

Definition Classes
override def query(q: SolrParams): CompletionStage[QueryResponse]

Performs a query to the Solr server

Performs a query to the Solr server

Value parameters

q

an object holding all key/value parameters to send along the request

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.QueryResponse} containing the response from the server

Definition Classes
override def query(q: SolrParams, method: METHOD): CompletionStage[QueryResponse]

Performs a query to the Solr server

Performs a query to the Solr server

Value parameters

method

specifies the HTTP method to use for the request, such as GET or POST

q

an object holding all key/value parameters to send along the request

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.QueryResponse} containing the response from the server

Definition Classes
def query(collection: String, q: SolrParams): CompletionStage[QueryResponse]

Performs a query to the Solr server

Performs a query to the Solr server

Value parameters

collection

the Solr collection to query

q

an object holding all key/value parameters to send along the request

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.QueryResponse} containing the response from the server

override def query(collection: String, q: SolrParams, method: METHOD): CompletionStage[QueryResponse]

Performs a query to the Solr server

Performs a query to the Solr server

Value parameters

collection

the Solr collection to query

method

specifies the HTTP method to use for the request, such as GET or POST

q

an object holding all key/value parameters to send along the request

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.QueryResponse} containing the response from the server

Definition Classes
def queryAndStreamResponse(q: SolrParams, callback: StreamingResponseCallback): CompletionStage[QueryResponse]

Query solr, and stream the results. Unlike the standard query, this will send events for each Document rather then add them to the QueryResponse.

Query solr, and stream the results. Unlike the standard query, this will send events for each Document rather then add them to the QueryResponse.

Although this function returns a 'QueryResponse' it should be used with care since it excludes anything that was passed to callback. Also note that future version may pass even more info to the callback and may not return the results in the QueryResponse.

Value parameters

callback

the callback to stream results to

q

an object holding all key/value parameters to send along the request

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.QueryResponse} containing the response from the server

def queryAndStreamResponse(collection: String, q: SolrParams, callback: StreamingResponseCallback): CompletionStage[QueryResponse]

Query solr, and stream the results. Unlike the standard query, this will send events for each Document rather then add them to the QueryResponse.

Query solr, and stream the results. Unlike the standard query, this will send events for each Document rather then add them to the QueryResponse.

Although this function returns a 'QueryResponse' it should be used with care since it excludes anything that was passed to callback. Also note that future version may pass even more info to the callback and may not return the results in the QueryResponse.

Value parameters

callback

the callback to stream results to

collection

the Solr collection to query

q

an object holding all key/value parameters to send along the request

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.QueryResponse} containing the response from the server

override def queryPreferred(q: SolrQuery, preferred: Option[SolrServer]): CompletionStage[(QueryResponse, SolrServer)]

Performs a query to a solr server taking the preferred server into account if provided.

Performs a query to a solr server taking the preferred server into account if provided.

Value parameters

preferred

the server that should be preferred to process the query. Specific LoadBalancer implementations have to support this and might add their own semantics.

q

the query to send to the solr server.

Attributes

Returns

the response and the server that handled the query.

Definition Classes
def rollback(): CompletionStage[UpdateResponse]

Performs a rollback of all non-committed documents pending. Note that this is not a true rollback as in databases. Content you have previously added may have been committed due to autoCommit, buffer full, other client performing a commit etc.

Performs a rollback of all non-committed documents pending. Note that this is not a true rollback as in databases. Content you have previously added may have been committed due to autoCommit, buffer full, other client performing a commit etc.

Attributes

Returns

an UpdateResponse containing the response from the server

def rollback(collection: String): CompletionStage[UpdateResponse]

Performs a rollback of all non-committed documents pending. Note that this is not a true rollback as in databases. Content you have previously added may have been committed due to autoCommit, buffer full, other client performing a commit etc.

Performs a rollback of all non-committed documents pending. Note that this is not a true rollback as in databases. Content you have previously added may have been committed due to autoCommit, buffer full, other client performing a commit etc.

Value parameters

collection

the Solr collection to send the rollback to

Attributes

Returns

an UpdateResponse containing the response from the server

Inherited methods

def addBean(collection: Option[String], obj: Any, commitWithinMs: Int): F[UpdateResponse]

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Adds a single bean specifying max time before it becomes committed The bean is converted to a SolrInputDocument by the client's DocumentObjectBinder

Value parameters

collection

to Solr collection to add documents to

obj

the input bean

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def addBeans(beanIterator: Iterator[_]): F[UpdateResponse]

Adds the beans supplied by the given iterator.

Adds the beans supplied by the given iterator.

Value parameters

beanIterator

the iterator which returns Beans

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def addBeans(collection: String, beanIterator: Iterator[_]): F[UpdateResponse]

Adds the beans supplied by the given iterator.

Adds the beans supplied by the given iterator.

Value parameters

beanIterator

the iterator which returns Beans

collection

the Solr collection to add the documents to

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def addBeans(collection: Option[String], beans: Iterable[_], commitWithinMs: Int): F[UpdateResponse]

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Adds a collection of beans specifying max time before they become committed The beans are converted to SolrInputDocuments by the client's DocumentObjectBinder

Value parameters

beans

the collection of beans

collection

the Solr collection to add documents to

commitWithinMs

max time (in ms) before a commit will happen

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def addDoc(collection: Option[String], doc: SolrInputDocument, commitWithinMs: Int): F[UpdateResponse]

Adds a single document specifying max time before it becomes committed

Adds a single document specifying max time before it becomes committed

Value parameters

collection

the Solr collection to add the document to

commitWithinMs

max time (in ms) before a commit will happen

doc

the input document

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def addDocs(docIterator: Iterator[SolrInputDocument]): F[UpdateResponse]

Adds the documents supplied by the given iterator.

Adds the documents supplied by the given iterator.

Value parameters

docIterator

the iterator which returns SolrInputDocument instances

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def addDocs(collection: String, docIterator: Iterator[SolrInputDocument]): F[UpdateResponse]

Adds the documents supplied by the given iterator.

Adds the documents supplied by the given iterator.

Value parameters

collection

the Solr collection to add documents to

docIterator

the iterator which returns SolrInputDocument instances

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def addDocs(collection: Option[String], docs: Iterable[SolrInputDocument], commitWithinMs: Int): F[UpdateResponse]

Adds a collection of documents, specifying max time before they become committed

Adds a collection of documents, specifying max time before they become committed

Value parameters

collection

the Solr collection to add documents to

commitWithinMs

max time (in ms) before a commit will happen

docs

the collection of documents

Attributes

Returns

an UpdateResponse from the server

Inherited from:
AsyncSolrClient
def commit(collection: Option[String], waitFlush: Boolean, waitSearcher: Boolean, softCommit: Boolean): F[UpdateResponse]

Performs an explicit commit, causing pending documents to be committed for indexing

Performs an explicit commit, causing pending documents to be committed for indexing

Value parameters

collection

the Solr collection to send the commit to

softCommit

makes index changes visible while neither fsync-ing index files nor writing a new index descriptor

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

Inherited from:
AsyncSolrClient
def deleteById(collection: Option[String], id: String, commitWithinMs: Int): F[UpdateResponse]

Deletes a single document by unique ID, specifying max time before commit

Deletes a single document by unique ID, specifying max time before commit

Value parameters

collection

the Solr collection to delete the document from

commitWithinMs

max time (in ms) before a commit will happen

id

the ID of the document to delete

Attributes

Returns

an UpdateResponse containing the response from the server

Inherited from:
AsyncSolrClient
def deleteByIds(collection: Option[String], ids: Seq[String], commitWithinMs: Int): F[UpdateResponse]

Deletes a list of documents by unique ID, specifying max time before commit

Deletes a list of documents by unique ID, specifying max time before commit

Value parameters

collection

the Solr collection to delete the documents from

commitWithinMs

max time (in ms) before a commit will happen

ids

the list of document IDs to delete

Attributes

Returns

an UpdateResponse containing the response from the server

Inherited from:
AsyncSolrClient
def deleteByQuery(collection: Option[String], query: String, commitWithinMs: Int): F[UpdateResponse]

Deletes documents from the index based on a query, specifying max time before commit

Deletes documents from the index based on a query, specifying max time before commit

Value parameters

collection

the Solr collection to delete the documents from

commitWithinMs

max time (in ms) before a commit will happen

query

the query expressing what documents to delete

Attributes

Returns

an UpdateResponse containing the response from the server

Inherited from:
AsyncSolrClient
def getById(collection: Option[String], id: String, params: Option[SolrParams]): F[Option[SolrDocument]]

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Retrieves the SolrDocument associated with the given identifier and uses the SolrParams to execute the request.

Value parameters

collection

the Solr collection to query

id

the id

params

additional parameters to add to the query

Attributes

Returns

retrieved SolrDocument, or None if no document is found.

Inherited from:
AsyncSolrClient
def getByIds(collection: Option[String], ids: Iterable[String], params: Option[SolrParams]): F[SolrDocumentList]

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

Retrieves the SolrDocuments associated with the given identifiers and uses the SolrParams to execute the request.

If a document was not found, it will not be added to the SolrDocumentList.

Value parameters

collection

the Solr collection to query

ids

the ids

params

additional parameters to add to the query

Attributes

Returns

a SolrDocumentList

Inherited from:
AsyncSolrClient
def optimize(collection: Option[String], waitFlush: Boolean, waitSearcher: Boolean, maxSegments: Int): F[UpdateResponse]

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Performs an explicit optimize, causing a merge of all segments to one. Note: In most cases it is not required to do explicit optimize

Value parameters

collection

the Solr collection to send the optimize to

maxSegments

optimizes down to at most this number of segments

waitFlush

block until index changes are flushed to disk

waitSearcher

block until a new searcher is opened and registered as the main query searcher, making the changes visible

Attributes

Returns

an UpdateResponse containing the response from the server

Inherited from:
AsyncSolrClient
def queryAndStreamResponse(collection: Option[String], q: SolrParams, callback: StreamingResponseCallback): F[QueryResponse]

Query solr, and stream the results. Unlike the standard query, this will send events for each Document rather then add them to the QueryResponse.

Query solr, and stream the results. Unlike the standard query, this will send events for each Document rather then add them to the QueryResponse.

Although this function returns a 'QueryResponse' it should be used with care since it excludes anything that was passed to callback. Also note that future version may pass even more info to the callback and may not return the results in the QueryResponse.

Value parameters

callback

the callback to stream results to

collection

the Solr collection to query

q

an object holding all key/value parameters to send along the request

Attributes

Returns

a { @link org.apache.solr.client.solrj.response.QueryResponse} containing the response from the server

Inherited from:
AsyncSolrClient
def rollback(collection: Option[String]): F[UpdateResponse]

Performs a rollback of all non-committed documents pending. Note that this is not a true rollback as in databases. Content you have previously added may have been committed due to autoCommit, buffer full, other client performing a commit etc.

Performs a rollback of all non-committed documents pending. Note that this is not a true rollback as in databases. Content you have previously added may have been committed due to autoCommit, buffer full, other client performing a commit etc.

Value parameters

collection

the Solr collection to send the rollback to

Attributes

Returns

an UpdateResponse containing the response from the server

Inherited from:
AsyncSolrClient
def shutdown(): Unit

Closes the http client (asynchronously) if it was not provided but created by this class.

Closes the http client (asynchronously) if it was not provided but created by this class.

Attributes

Inherited from:
AsyncSolrClient