class AsyncSolrClient[F[_]] extends AnyRef

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 future of a SolrResponse.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AsyncSolrClient
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AsyncSolrClient(loadBalancer: LoadBalancer, httpClient: AsyncHttpClient, shutdownHttpClient: Boolean, requestInterceptor: Option[RequestInterceptor] = None, requestWriter: RequestWriter = new BinaryRequestWriter, responseParser: ResponseParser = new BinaryResponseParser, metrics: Metrics = NoopMetrics, serverStateObservation: Option[ServerStateObservation[F]] = None, retryPolicy: RetryPolicy = RetryPolicy.TryOnce)(implicit futureFactory: FutureFactory[F])
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addBean(collection: Option[String] = None, obj: Any, commitWithinMs: Int = -1): 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

    collection

    to Solr collection to add documents to

    obj

    the input bean

    returns

    an UpdateResponse from the server

  5. def addBeans(beanIterator: Iterator[_]): F[UpdateResponse]

    Adds the beans supplied by the given iterator.

    Adds the beans supplied by the given iterator.

    beanIterator

    the iterator which returns Beans

    returns

    an UpdateResponse from the server

  6. def addBeans(collection: String, beanIterator: Iterator[_]): F[UpdateResponse]

    Adds the beans supplied by the given iterator.

    Adds the beans supplied by the given iterator.

    collection

    the Solr collection to add the documents to

    beanIterator

    the iterator which returns Beans

    returns

    an UpdateResponse from the server

  7. def addBeans(collection: Option[String] = None, beans: Iterable[_], commitWithinMs: Int = -1): 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

    collection

    the Solr collection to add documents to

    beans

    the collection of beans

    commitWithinMs

    max time (in ms) before a commit will happen

    returns

    an UpdateResponse from the server

  8. def addDoc(collection: Option[String] = None, doc: SolrInputDocument, commitWithinMs: Int = -1): F[UpdateResponse]

    Adds a single document specifying max time before it becomes committed

    Adds a single document specifying max time before it becomes committed

    collection

    the Solr collection to add the document to

    doc

    the input document

    commitWithinMs

    max time (in ms) before a commit will happen

    returns

    an UpdateResponse from the server

  9. def addDocs(docIterator: Iterator[SolrInputDocument]): F[UpdateResponse]

    Adds the documents supplied by the given iterator.

    Adds the documents supplied by the given iterator.

    docIterator

    the iterator which returns SolrInputDocument instances

    returns

    an UpdateResponse from the server

  10. 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.

    collection

    the Solr collection to add documents to

    docIterator

    the iterator which returns SolrInputDocument instances

    returns

    an UpdateResponse from the server

  11. def addDocs(collection: Option[String] = None, docs: Iterable[SolrInputDocument], commitWithinMs: Int = -1): 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

    collection

    the Solr collection to add documents to

    docs

    the collection of documents

    commitWithinMs

    max time (in ms) before a commit will happen

    returns

    an UpdateResponse from the server

  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  14. def commit(collection: Option[String] = None, waitFlush: Boolean = true, waitSearcher: Boolean = true, softCommit: Boolean = false): 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

    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

    softCommit

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

    returns

    an UpdateResponse containing the response from the server

  15. def deleteById(collection: Option[String] = None, id: String, commitWithinMs: Int = -1): 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

    collection

    the Solr collection to delete the document from

    id

    the ID of the document to delete

    commitWithinMs

    max time (in ms) before a commit will happen

    returns

    an UpdateResponse containing the response from the server

  16. def deleteByIds(collection: Option[String] = None, ids: Seq[String], commitWithinMs: Int = -1): 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

    collection

    the Solr collection to delete the documents from

    ids

    the list of document IDs to delete

    commitWithinMs

    max time (in ms) before a commit will happen

    returns

    an UpdateResponse containing the response from the server

  17. def deleteByQuery(collection: Option[String] = None, query: String, commitWithinMs: Int = -1): 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

    collection

    the Solr collection to delete the documents from

    query

    the query expressing what documents to delete

    commitWithinMs

    max time (in ms) before a commit will happen

    returns

    an UpdateResponse containing the response from the server

  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. def execute[T <: SolrResponse](r: SolrRequest[_ <: T])(implicit arg0: SolrResponseFactory[T]): F[T]

    Performs a request to a solr server.

    Performs a request to a solr server.

    r

    the request to send to solr.

  21. def executePreferred[T <: SolrResponse](r: SolrRequest[_ <: T], preferred: Option[SolrServer])(implicit arg0: SolrResponseFactory[T]): F[(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.

    r

    the request to send to the solr server.

    preferred

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

    returns

    the response and the server that handled the request.

  22. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def getById(collection: Option[String] = None, id: String, params: Option[SolrParams] = None): 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.

    collection

    the Solr collection to query

    id

    the id

    params

    additional parameters to add to the query

    returns

    retrieved SolrDocument, or None if no document is found.

  24. def getByIds(collection: Option[String] = None, ids: Iterable[String], params: Option[SolrParams] = None): 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.

    collection

    the Solr collection to query

    ids

    the ids

    params

    additional parameters to add to the query

    returns

    a SolrDocumentList

  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def getErrorReason(url: String, rsp: NamedList[_], response: Response): String
    Attributes
    protected
  27. def getPath(request: SolrRequest[_ <: SolrResponse]): String
    Attributes
    protected
  28. def getResponseEncoding(response: Response): String
    Attributes
    protected
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. def optimize(collection: Option[String] = None, waitFlush: Boolean = true, waitSearcher: Boolean = true, maxSegments: Int = 1): F[UpdateResponse]

    Performs an explicit optimize, causing a merge of all segments to one.

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

    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

    maxSegments

    optimizes down to at most this number of segments

    returns

    an UpdateResponse containing the response from the server

  35. def ping(): F[SolrPingResponse]

    Issues a ping request to check if the server is alive

    Issues a ping request to check if the server is alive

    returns

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

  36. def query(collection: String, q: SolrParams, method: METHOD = GET): F[QueryResponse]

    Performs a query to the Solr server

    Performs a query to the Solr server

    collection

    the Solr collection to query

    q

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

    method

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

    returns

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

  37. def query(q: SolrParams, method: METHOD): F[QueryResponse]

    Performs a query to the Solr server

    Performs a query to the Solr server

    q

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

    method

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

    returns

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

  38. def query(q: SolrParams): F[QueryResponse]

    Performs a query to the Solr server

    Performs a query to the Solr server

    q

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

    returns

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

  39. def queryAndStreamResponse(collection: Option[String] = None, q: SolrParams, callback: StreamingResponseCallback): F[QueryResponse]

    Query solr, and stream the results.

    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.

    collection

    the Solr collection to query

    q

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

    callback

    the callback to stream results to

    returns

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

  40. def queryPreferred(q: SolrQuery, preferred: Option[SolrServer]): F[(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.

    q

    the query to send to the solr server.

    preferred

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

    returns

    the response and the server that handled the query.

  41. def rollback(collection: Option[String] = None): F[UpdateResponse]

    Performs a rollback of all non-committed documents pending.

    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.

    collection

    the Solr collection to send the rollback to

    returns

    an UpdateResponse containing the response from the server

  42. def shutdown(): Unit

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

  43. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  44. def toSolrResponse[T <: SolrResponse](r: SolrRequest[_ <: T], response: Response, url: String, startTime: Long)(implicit arg0: SolrResponseFactory[T], server: SolrServer): T
    Attributes
    protected
    Annotations
    @throws( ... )
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. def validateMimeType(expectedContentType: String, response: Response): Unit
    Attributes
    protected
    Annotations
    @throws( ... )
  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped