com.codemettle.akkasolr.querybuilder

SolrQueryBuilder

case class SolrQueryBuilder(query: String, rowsOpt: Option[Int] = None, startOpt: Option[Int] = None, fieldList: Vector[String] = Vector.empty, sortsList: Vector[SortClause] = Vector.empty, facetFields: Vector[String] = Vector.empty, serverTimeAllowed: Option[Int] = None) extends Product with Serializable

An (incomplete) immutable builder for Solr queries. Currently only has common org.apache.solr.client.solrj.SolrQuery shortcuts, but more can be added easily as the need arises.

Sample Usage
import com.codemettle.akkasolr.client.SolrQueryBuilder.FieldStrToSort

val b = SolrQueryBuilder("*") rows 21 fields "field" sortBy "myfield".desc
val b2 = b facets "facetfield"
query(b.toParams)
query(b2.toParams)
Annotations
@SerialVersionUID()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SolrQueryBuilder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SolrQueryBuilder(query: String, rowsOpt: Option[Int] = None, startOpt: Option[Int] = None, fieldList: Vector[String] = Vector.empty, sortsList: Vector[SortClause] = Vector.empty, facetFields: Vector[String] = Vector.empty, serverTimeAllowed: Option[Int] = None)

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 allowedExecutionTime(duration: Duration): SolrQueryBuilder

  5. def allowedExecutionTime(duration: FiniteDuration): SolrQueryBuilder

  6. def allowedExecutionTime(millis: Int): SolrQueryBuilder

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. val facetFields: Vector[String]

  11. def facets(fs: String*): SolrQueryBuilder

  12. val fieldList: Vector[String]

  13. def fields(fs: String*): SolrQueryBuilder

  14. def finalize(): Unit

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

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

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

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. val query: String

  21. def rows(r: Int): SolrQueryBuilder

  22. val rowsOpt: Option[Int]

  23. val serverTimeAllowed: Option[Int]

  24. def sortBy(scs: SortClause*): SolrQueryBuilder

  25. def sortBy(sc: SortClause): SolrQueryBuilder

  26. val sortsList: Vector[SortClause]

  27. def start(s: Int): SolrQueryBuilder

  28. val startOpt: Option[Int]

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

    Definition Classes
    AnyRef
  30. def toParams: ImmutableSolrParams

    Create a SolrParams object that can be used for Solr queries

    Create a SolrParams object that can be used for Solr queries

    returns

    an ImmutableSolrParams representing the state of the builder

  31. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def withFacetField(f: String): SolrQueryBuilder

  35. def withFacetFields(fs: String*): SolrQueryBuilder

  36. def withField(f: String): SolrQueryBuilder

  37. def withFields(fs: String*): SolrQueryBuilder

  38. def withQuery(qp: QueryPart)(implicit arf: ActorRefFactory): SolrQueryBuilder

  39. def withQuery(q: String): SolrQueryBuilder

  40. def withSort(sc: SortClause): SolrQueryBuilder

  41. def withSorts(scs: SortClause*): SolrQueryBuilder

  42. def withoutAllowedExecutionTime(): SolrQueryBuilder

  43. def withoutFacetField(f: String): SolrQueryBuilder

  44. def withoutFacetFields(): SolrQueryBuilder

  45. def withoutFacetFields(fs: String*): SolrQueryBuilder

  46. def withoutField(f: String): SolrQueryBuilder

  47. def withoutFields(): SolrQueryBuilder

  48. def withoutFields(fs: String*): SolrQueryBuilder

  49. def withoutRows(): SolrQueryBuilder

  50. def withoutSort(sc: SortClause): SolrQueryBuilder

  51. def withoutSortField(f: String): SolrQueryBuilder

  52. def withoutSorts(): SolrQueryBuilder

  53. def withoutStart(): SolrQueryBuilder

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped