Liking cljdoc? Tell your friends :D

com.nytimes.querqy.commonrules

CommonRules based rewriter

CommonRules based rewriter
raw docstring

*query-parser*clj

source

boostclj

(boost boost query)

Boost a matching term or query.

;; Boost recipes which take less than 30 minutes when queries
;; match quick and recipe or recipes.
(match (and "quick" (or "recipe" "recipes")
  (boost 10 {:range {:minutes {:lte 30}}}))
Boost a matching term or query.

```clojure
;; Boost recipes which take less than 30 minutes when queries
;; match quick and recipe or recipes.
(match (and "quick" (or "recipe" "recipes")
  (boost 10 {:range {:minutes {:lte 30}}}))
```
sourceraw docstring

CommonRulesRewriterBuildercljprotocol

common-rules-rewriter*clj

(common-rules-rewriter* this)
source

deleteclj

(delete string)

Delete text from a matched query. This is useful for removing unhelpful search terms from the query.

Delete text from a matched query. This is useful for removing unhelpful
search terms from the query.
sourceraw docstring

delete?clj

(delete? obj)
source

filterclj

(filter query)

Add a filter to the query. Filters require a match on documents.

(match "by paul krugman"
  (filter {:term {:author "Paul Krugman"}}))
Add a filter to the query. Filters require a match on documents.

```clojure
(match "by paul krugman"
  (filter {:term {:author "Paul Krugman"}}))
```
sourceraw docstring

matchcljmacro

(match head & tail)

Create a rewriter rule from matching text input or boolean input followed by any number of query transformations.

;; Inject bar as a synonym to foo in any query.
(match "foo"
  (synonym "bar"))
Create a rewriter rule from matching text input or boolean input followed by
any number of query transformations.

```clojure
;; Inject bar as a synonym to foo in any query.
(match "foo"
  (synonym "bar"))
```
sourceraw docstring

match*clj

(match* head & tail)

Create a

Create a 
sourceraw docstring

parse-boolean-inputcljmultimethod

source

parse-rulesclj

(parse-rules stream)
(parse-rules stream
             {:keys [boolean-input ignore-case parser]
              :or {boolean-input true
                   ignore-case true
                   parser (WhiteSpaceQuerqyParserFactory.)}})
source

parse-simple-inputclj

(parse-simple-input string)
source

rewriter-factoryclj

(rewriter-factory rules)
source

rules-rewriterclj

(rules-rewriter & args)

Create a CommonRulesRewriter.

You may pass in a resource pointing to a Querqy CommonRulesRewriter file or use the Clojure-DSL.

Create a CommonRulesRewriter.

You may pass in a resource pointing to a Querqy CommonRulesRewriter file or
use the Clojure-DSL.
sourceraw docstring

synonymclj

(synonym string)
(synonym boost string)

Create a synonym for the matched text.

(match "chickpeas"
  (synonym "garbanzo beans"))
Create a synonym for the matched text.

```clojure
(match "chickpeas"
  (synonym "garbanzo beans"))
```
sourceraw docstring

synonym?clj

(synonym? obj)
source

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

× close