boosting | R Documentation |
boosting dsl
boosting(.obj = list(), ..., negative_boost = NULL) boosting_(.obj = list(), ..., .dots, negative_boost = NULL)
.obj |
An index object. If nothing passed defaults to all indices, equivalent to
doing e.g., |
... |
Further args passed on |
negative_boost |
Explanation... |
.dots |
Explanation... |
## Not run: elastic::connect(errors = "complete") # boosting query boost <- '{ "query" : { "boosting" : { "positive" : { "term" : { "play_name" : "henry" } }, "negative" : { "term" : { "text_entry" : "thou" } }, "negative_boost" : 0.8 } } }' elastic::Search(index="shakespeare", body=boost) index("shakespeare") %>% boosting(positive = list(term = list(play_name = "henry")), negative_boost = 0.8) index("shakespeare") %>% boosting(positive = list(term = list(play_name = "henry")), negative = list(term = list(text_entry = "thou")), negative_boost = 0.8) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.