Class

jp.sf.amateras.solr.scala

SolrClient

Related Doc: package scala

Permalink

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())

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add(docs: Any*): BatchRegister

    Permalink

    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

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def commit(): Unit

    Permalink

    Commit the current session.

  8. def deleteById(id: String): Unit

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def query(query: String): QueryBuilder

    Permalink

    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

    Permalink

    Add documents and commit them immediately.

    Add documents and commit them immediately.

    docs

    documents to register

  21. def rollback(): Unit

    Permalink

    Rolled back the current session.

  22. def shutdown(): Unit

    Permalink

    Shutdown this solr client to release allocated resources.

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withTransaction[T](operations: ⇒ T): T

    Permalink

    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