summaryrefslogtreecommitdiff
path: root/docs/reference/query-dsl/queries/boosting-query.asciidoc
diff options
context:
space:
mode:
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
+ }
+}
+--------------------------------------------------