ElasticQuery

zio.elasticsearch.ElasticQuery$

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

final def contains[S](field: Field[S, _], value: String): WildcardQuery[S]

Constructs a type-safe instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that contains the specified value in the specified field.

Constructs a type-safe instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that contains the specified value in the specified field.

Attributes

S

document for which field query is executed

field

the Field object representing the type-safe field for which query is specified for

value

text value that will be used for the query in the pattern that represents contains

Returns:

an instance of WildcardQuery that represents the wildcard query to be performed.

final def contains(field: String, value: String): WildcardQuery[Any]

Constructs an instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that contains the specified value in the specified field.

Constructs an instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that contains the specified value in the specified field.

Attributes

field

the field for which query is specified for

value

text value that will be used for the query in the pattern that represents contains

Returns:

an instance of WildcardQuery that represents the wildcard query to be performed.

final def exists[S](field: Field[S, _]): ExistsQuery[S]

Constructs a type-safe instance of ExistsQuery, that checks existence of the field, using the specified parameters.

Constructs a type-safe instance of ExistsQuery, that checks existence of the field, using the specified parameters.

Attributes

S

document for which field query is executed

field

the Field representing the type-safe field for which query is specified for

Returns:

an instance of ExistsQuery that represents the exists query to be performed.

final def exists(field: String): ExistsQuery[Any]

Constructs an instance of ExistsQuery, that checks existence of the field, using the specified parameters.

Constructs an instance of ExistsQuery, that checks existence of the field, using the specified parameters.

Attributes

field

the field for which query is specified for

Returns:

an instance of ExistsQuery that represents the exists query to be performed.

final def filter[S : Schema](queries: ElasticQuery[S]*): BoolQuery[S]

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Attributes

S

document for which field query is executed. An implicit Schema instance must be in scope

queries

a list of queries to add to filter inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that must satisfy the criteria.

final def filter(queries: ElasticQuery[Any]*): BoolQuery[Any]

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Attributes

queries

a list of queries to add to filter inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that must satisfy the criteria.

Constructs an instance of MatchAllQuery used for matching all documents.

Constructs an instance of MatchAllQuery used for matching all documents.

Attributes

Returns:

an instance of MatchAllQuery that represents the match all query to be performed.

final def matches[S, A : ElasticPrimitive](field: Field[S, A], value: A): MatchQuery[S]

Constructs a type-safe instance of MatchQuery using the specified parameters. MatchQuery is used for matching a provided text, number, date or boolean value

Constructs a type-safe instance of MatchQuery using the specified parameters. MatchQuery is used for matching a provided text, number, date or boolean value

Attributes

A

the type of value to be matched. A JSON decoder must be in scope for this type

S

document for which field query is executed

field

the Field object representing the type-safe field for which query is specified for

value

the value to be matched, represented by an instance of type A

Returns:

an instance of MatchQuery that represents the match query to be performed.

final def matches[A : ElasticPrimitive](field: String, value: A): MatchQuery[Any]

Constructs an instance of MatchQuery using the specified parameters. MatchQuery is used for matching a provided text, number, date or boolean value

Constructs an instance of MatchQuery using the specified parameters. MatchQuery is used for matching a provided text, number, date or boolean value

Attributes

A

the type of value to be matched. A JSON decoder must be in scope for this type

field

the field for which query is specified for

value

the value to be matched, represented by an instance of type A

Returns:

an instance of MatchQuery that represents the match query to be performed.

final def must[S : Schema](queries: ElasticQuery[S]*): BoolQuery[S]

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Attributes

S

document for which field query is executed. An implicit Schema instance must be in scope

queries

a list of queries to add to must inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that must satisfy the criteria.

final def must(queries: ElasticQuery[Any]*): BoolQuery[Any]

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that must satisfy the criteria using the specified parameters.

Attributes

queries

a list of queries to add to must inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that must satisfy the criteria.

final def mustNot[S : Schema](queries: ElasticQuery[S]*): BoolQuery[S]

Constructs an instance of BoolQuery with queries that must not satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that must not satisfy the criteria using the specified parameters.

Attributes

S

document for which field query is executed. An implicit Schema instance must be in scope

queries

a list of queries to add to mustNot inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that must not satisfy the criteria.

final def mustNot(queries: ElasticQuery[Any]*): BoolQuery[Any]

Constructs an instance of BoolQuery with queries that must not satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that must not satisfy the criteria using the specified parameters.

Attributes

queries

a list of queries to add to mustNot inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that must not satisfy the criteria.

final def nested[S, A](path: Field[S, Seq[A]], query: ElasticQuery[A]): NestedQuery[S]

Constructs a type-safe instance of NestedQuery using the specified parameters. NestedQuery wraps another query to search nested fields.

Constructs a type-safe instance of NestedQuery using the specified parameters. NestedQuery wraps another query to search nested fields.

Attributes

A

the type of the value that will be used for the query

S

document for which field query is executed

path

the Field object representing the type-safe path to the field for which query is specified for

query

the ElasticQuery object representing the query to execute on nested objects.

Returns:

an instance of NestedQuery that represents the nested query to be performed.

final def nested(path: String, query: ElasticQuery[_]): NestedQuery[Any]

Constructs an instance of NestedQuery using the specified parameters. NestedQuery wraps another query to search nested fields.

Constructs an instance of NestedQuery using the specified parameters. NestedQuery wraps another query to search nested fields.

Attributes

path

the path to the field for which query is specified for

query

the ElasticQuery object representing the query to execute on nested objects.

Returns:

an instance of NestedQuery that represents the nested query to be performed.

final def range[S, A](field: Field[S, A]): RangeQuery[S, A, Unbounded.type, Unbounded.type]

Constructs a type-safe unbounded instance of RangeQuery using the specified parameters.

Constructs a type-safe unbounded instance of RangeQuery using the specified parameters.

Attributes

A

the type of the value that will be used for the query

S

document for which field query is executed

field

the Field object representing the type-safe field for which query is specified for

Returns:

an instance of RangeQuery that represents the range query to be performed.

final def range(field: String): RangeQuery[Any, Any, Unbounded.type, Unbounded.type]

Constructs an unbounded instance of RangeQuery using the specified parameters.

Constructs an unbounded instance of RangeQuery using the specified parameters.

Attributes

field

the field for which query is specified for

Returns:

an instance of RangeQuery that represents the range query to be performed.

final def should[S : Schema](queries: ElasticQuery[S]*): BoolQuery[S]

Constructs an instance of BoolQuery with queries that should satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that should satisfy the criteria using the specified parameters.

Attributes

S

document for which field query is executed. An implicit Schema instance must be in scope

queries

a list of queries to add to should inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that should satisfy the criteria.

final def should(queries: ElasticQuery[Any]*): BoolQuery[Any]

Constructs an instance of BoolQuery with queries that should satisfy the criteria using the specified parameters.

Constructs an instance of BoolQuery with queries that should satisfy the criteria using the specified parameters.

Attributes

queries

a list of queries to add to should inside of the Bool query

Returns:

an instance of BoolQuery that represents the bool query with queries that should satisfy the criteria.

final def startsWith[S](field: Field[S, _], value: String): WildcardQuery[S]

Constructs a type-safe instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that starts with the specified value in the specified field.

Constructs a type-safe instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that starts with the specified value in the specified field.

Attributes

S

document for which field query is executed in the pattern that represents startsWith

field

the Field object representing the type-safe field for which query is specified for

value

text value that will be used for the query

Returns:

an instance of WildcardQuery that represents the wildcard query to be performed.

final def startsWith(field: String, value: String): WildcardQuery[Any]

Constructs an instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that starts with the specified value in the specified field.

Constructs an instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that starts with the specified value in the specified field.

Attributes

field

the field for which query is specified for

value

text value that will be used for the query in the pattern that represents startsWith

Returns:

an instance of WildcardQuery that represents the wildcard query to be performed.

final def term[S, A : ElasticPrimitive](field: Field[S, A], value: A): TermQuery[S]

Constructs a type-safe instance of TermQuery using the specified parameters. TermQuery is used for matching documents that contain an exact term in a provided field.

Constructs a type-safe instance of TermQuery using the specified parameters. TermQuery is used for matching documents that contain an exact term in a provided field.

Attributes

A

the type of value that will be used for the query. A JSON decoder must be in scope for this type

S

document for which field query is executed

field

the Field object representing the type-safe field for which query is specified for

value

the value that will be used for the query, represented by an instance of type A

Returns:

an instance of TermQuery that represents the term query to be performed.

final def term[A : ElasticPrimitive](field: String, value: A): Term[Any, A]

Constructs a type-safe instance of TermQuery using the specified parameters. TermQuery is used for matching documents that contain an exact term in a provided field.

Constructs a type-safe instance of TermQuery using the specified parameters. TermQuery is used for matching documents that contain an exact term in a provided field.

Attributes

A

the type of value that will be used for the query. A JSON decoder must be in scope for this type

field

the field for which query is specified for

value

the value that will be used for the query, represented by an instance of type A

Returns:

an instance of TermQuery that represents the term query to be performed.

final def wildcard[S](field: Field[S, _], value: String): Wildcard[S]

Constructs a type-safe instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that matches a provided pattern value.

Constructs a type-safe instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that matches a provided pattern value.

Attributes

S

document for which field query is executed

field

the Field object representing the type-safe field for which query is specified for

value

text value that will be used for the query

Returns:

an instance of WildcardQuery that represents the wildcard query to be performed.

final def wildcard(field: String, value: String): Wildcard[Any]

Constructs an instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that matches a provided pattern value.

Constructs an instance of WildcardQuery using the specified parameters. WildcardQuery is used for matching documents containing a value that matches a provided pattern value.

Attributes

field

the field for which query is specified for

value

text value that will be used for the query

Returns:

an instance of WildcardQuery that represents the wildcard query to be performed.