summaryrefslogtreecommitdiff
path: root/docs/reference/query-dsl/queries/boosting-query.asciidoc
diff options
context:
space:
mode:
authorHilko Bengen <bengen@debian.org>2014-06-07 12:02:12 +0200
committerHilko Bengen <bengen@debian.org>2014-06-07 12:02:12 +0200
commitd5ed89b946297270ec28abf44bef2371a06f1f4f (patch)
treece2d945e4dde69af90bd9905a70d8d27f4936776 /docs/reference/query-dsl/queries/boosting-query.asciidoc
downloadelasticsearch-d5ed89b946297270ec28abf44bef2371a06f1f4f.tar.gz
Imported Upstream version 1.0.3upstream/1.0.3
Diffstat (limited to 'docs/reference/query-dsl/queries/boosting-query.asciidoc')
-rw-r--r--docs/reference/query-dsl/queries/boosting-query.asciidoc26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/reference/query-dsl/queries/boosting-query.asciidoc b/docs/reference/query-dsl/queries/boosting-query.asciidoc
new file mode 100644
index 0000000..969b3bb
--- /dev/null
+++ b/docs/reference/query-dsl/queries/boosting-query.asciidoc
@@ -0,0 +1,26 @@
+[[query-dsl-boosting-query]]
+=== Boosting Query
+
+The `boosting` query can be used to effectively demote results that
+match a given query. Unlike the "NOT" clause in bool query, this still
+selects documents that contain undesirable terms, but reduces their
+overall score.
+
+[source,js]
+--------------------------------------------------
+{
+ "boosting" : {
+ "positive" : {
+ "term" : {
+ "field1" : "value1"
+ }
+ },
+ "negative" : {
+ "term" : {
+ "field2" : "value2"
+ }
+ },
+ "negative_boost" : 0.2
+ }
+}
+--------------------------------------------------