Packages

class SolrClient extends AnyRef

This is the simple Apache Solr client for Scala.

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

Instance Constructors

  1. new SolrClient(url: String)(implicit factory: (String) ⇒ org.apache.solr.client.solrj.SolrClient = ..., parser: ExpressionParser = new DefaultExpressionParser())

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 add(docs: Any*): BatchRegister

    Execute batch updating.

    Execute batch updating.

    Note: To register documents actual, you have to call commit after added them.

    import jp.sf.amateras.solr.scala._
    
    val client = new SolrClient("http://localhost:8983/solr")
    
    client.add(Map("id"->"001", "manu" -> "Lenovo", "name" -> "ThinkPad X201s"))
          .add(Map("id"->"002", "manu" -> "Lenovo", "name" -> "ThinkPad X202"))
          .add(Map("id"->"003", "manu" -> "Lenovo", "name" -> "ThinkPad X100e"))
          .commit
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def commit(): Unit

    Commit the current session.

  8. def deleteById(id: String): Unit

    Delete the document which has a given id.

    Delete the document which has a given id.

    id

    the identifier of the document to delete

  9. def deleteByQuery(query: String, params: Map[String, Any] = Map()): Unit

    Delete documents by the given query.

    Delete documents by the given query.

    query

    the solr query to select documents which would be deleted

    params

    the parameter map which would be given to the query

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  19. def query(query: String): QueryBuilder

    Search documents using the given query.

    Search documents using the given query.

    import jp.sf.amateras.solr.scala._
    
    val client = new SolrClient("http://localhost:8983/solr")
    
    val result: List[Map[String, Any]] =
      client.query("*:*")
            .fields("id", "manu", "name")
            .sortBy("id", Order.asc)
            .getResultAsMap()
  20. def register(docs: Any*): Unit

    Add documents and commit them immediately.

    Add documents and commit them immediately.

    docs

    documents to register

  21. def rollback(): Unit

    Rolled back the current session.

  22. def shutdown(): Unit

    Shutdown this solr client to release allocated resources.

  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withTransaction[T](operations: ⇒ T): T

    Execute given operation in the transaction.

    Execute given operation in the transaction.

    The transaction is committed if operation was successful. But the transaction is rolled back if an error occurred.

Inherited from AnyRef

Inherited from Any

Ungrouped