Liking cljdoc? Tell your friends :D

com.nytimes.querqy.elasticsearch

Convert a querqy.model.ExpandedQuery into an Elasticsearch query. You may control the query generation with the following keys in the opts map. See the Elasticsearch documentation for their meaning. The returned query will always be a function score query whose :query object is a boolean query. The shape is:

{:function_score
  {:query     {:bool
                {:should   [,,,]
                 :must     [,,,]
                 :must_not [,,,]
                 :filter   []}}
   :functions [,,,]}}

Since this query will always be returned in this shape, you can inject constant filter or boosting functions into the generated queries for your domain.

The options map accepts the following values. Consult the Elasticsearch documentation for their meaning.

  • :match/fields
  • :match/anayzer
  • :match/auto_generate_synonyms_phrase_query
  • :match/fuzziness
  • :match/max_expansions
  • :match/prefix_length
  • :match/fuzzy_transpositions
  • :match/fuzzy_rewrite
  • :match/lenient
  • :match/operator
  • :match/minimum_should_match
  • :match/zero_terms_query
  • :dis_max/tie_breaker
Convert a `querqy.model.ExpandedQuery` into an Elasticsearch query.
You may control the query generation with the following keys in the opts map.
See the Elasticsearch documentation for their meaning.
The returned query will always be a function score query whose `:query` object
is a boolean query. The shape is:
```
{:function_score
  {:query     {:bool
                {:should   [,,,]
                 :must     [,,,]
                 :must_not [,,,]
                 :filter   []}}
   :functions [,,,]}}
```
Since this query will always be returned in this shape, you can inject
constant filter or boosting functions into the generated queries for your
domain.

The options map accepts the following values. Consult the Elasticsearch
documentation for their meaning.

- `:match/fields`
- `:match/anayzer`
- `:match/auto_generate_synonyms_phrase_query`
- `:match/fuzziness`
- `:match/max_expansions`
- `:match/prefix_length`
- `:match/fuzzy_transpositions`
- `:match/fuzzy_rewrite`
- `:match/lenient`
- `:match/operator`
- `:match/minimum_should_match`
- `:match/zero_terms_query`
- `:dis_max/tie_breaker`
raw docstring

add-boostclj

(add-boost q & clauses)

Add a boosting function to the outre function score query.

Add a boosting function to the outre function score query.
sourceraw docstring

add-filterclj

(add-filter q & clauses)

Add a filter clause onto the inner boolean query.

Add a filter clause onto the inner boolean query.
sourceraw docstring

add-mustclj

(add-must q & clauses)

Add a must clause onto the inner boolean query.

Add a must clause onto the inner boolean query.
sourceraw docstring

add-must-notclj

(add-must-not q & clauses)

Add a must_not clause onto the inner boolean query.

Add a must_not clause onto the inner boolean query.
sourceraw docstring

add-shouldclj

(add-should q & clauses)

Add a should clause onto the inner boolean query.

Add a should clause onto the inner boolean query.
sourceraw docstring

elasticsearch-query-emitterclj

(elasticsearch-query-emitter)
source

flattenvclj

source

forvcljmacro

(forv & args)
source

InternalEmittercljprotocol

emit*clj

(emit* this opts)
source

set-minimum-should-matchclj

(set-minimum-should-match q min-match)

Set the minimum_should_match value for the inner boolean query.

Set the minimum_should_match value for the inner boolean query.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close