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`
(add-boost q & clauses)
Add a boosting function to the outre function score query.
Add a boosting function to the outre function score query.
(add-filter q & clauses)
Add a filter clause onto the inner boolean query.
Add a filter clause onto the inner boolean query.
(add-must q & clauses)
Add a must clause onto the inner boolean query.
Add a must clause onto the inner boolean query.
(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.
(add-should q & clauses)
Add a should clause onto the inner boolean query.
Add a should clause onto the inner boolean query.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close