Browse Source

Something messed with auto-indent. Fixed now.

Isabel Drost-Fromm 9 years ago
parent
commit
0ad87b25cf

+ 6 - 6
docs/reference/query-dsl/boosting-query.asciidoc

@@ -17,12 +17,12 @@ GET /_search
                     "field1" : "value1"
                 }
             },
-                "negative" : {
-                    "term" : {
-                        "field2" : "value2"
-                    }
-                },
-                "negative_boost" : 0.2
+            "negative" : {
+                 "term" : {
+                     "field2" : "value2"
+                }
+            },
+            "negative_boost" : 0.2
         }
     }
 }

+ 15 - 15
docs/reference/query-dsl/common-terms-query.asciidoc

@@ -173,11 +173,11 @@ GET /_search
                     "minimum_should_match": 2
                 }
             },
-                "should": [
-                    { "term": { "body": "the"}},
-                    { "term": { "body": "as"}},
-                    { "term": { "body": "a"}}
-                    ]
+            "should": [
+                { "term": { "body": "the"}},
+                { "term": { "body": "as"}},
+                { "term": { "body": "a"}}
+                ]
         }
     }
 }
@@ -230,17 +230,17 @@ GET /_search
                     "minimum_should_match": 2
                 }
             },
-                "should": {
-                    "bool": {
-                        "should": [
-                        { "term": { "body": "the"}},
-                        { "term": { "body": "not"}},
-                        { "term": { "body": "as"}},
-                        { "term": { "body": "a"}}
-                        ],
-                        "minimum_should_match": 3
-                    }
+            "should": {
+                "bool": {
+                    "should": [
+                    { "term": { "body": "the"}},
+                    { "term": { "body": "not"}},
+                    { "term": { "body": "as"}},
+                    { "term": { "body": "a"}}
+                    ],
+                    "minimum_should_match": 3
                 }
+            }
         }
     }
 }

+ 38 - 38
docs/reference/query-dsl/geo-bounding-box-query.asciidoc

@@ -48,20 +48,20 @@ GET /_search
             "must" : {
                 "match_all" : {}
             },
-                "filter" : {
-                    "geo_bounding_box" : {
-                        "pin.location" : {
-                            "top_left" : {
-                                "lat" : 40.73,
-                                "lon" : -74.1
-                            },
-                            "bottom_right" : {
-                                "lat" : 40.01,
-                                "lon" : -71.12
-                            }
+            "filter" : {
+                "geo_bounding_box" : {
+                    "pin.location" : {
+                        "top_left" : {
+                            "lat" : 40.73,
+                            "lon" : -74.1
+                        },
+                        "bottom_right" : {
+                            "lat" : 40.01,
+                            "lon" : -71.12
                         }
                     }
                 }
+            }
         }
     }
 }
@@ -141,14 +141,14 @@ GET /_search
             "must" : {
                 "match_all" : {}
             },
-                "filter" : {
-                    "geo_bounding_box" : {
-                        "pin.location" : {
-                            "top_left" : [-74.1, 40.73],
-                            "bottom_right" : [-71.12, 40.01]
-                        }
+            "filter" : {
+                "geo_bounding_box" : {
+                    "pin.location" : {
+                        "top_left" : [-74.1, 40.73],
+                        "bottom_right" : [-71.12, 40.01]
                     }
                 }
+            }
         }
     }
 }
@@ -169,17 +169,17 @@ GET /_search
             "must" : {
                 "match_all" : {}
             },
-                "filter" : {
-                    "geo_bounding_box" : {
-                        "pin.location" : {
-                            "top_left" : "40.73, -74.1",
-                            "bottom_right" : "40.01, -71.12"
-                        }
+            "filter" : {
+                "geo_bounding_box" : {
+                    "pin.location" : {
+                        "top_left" : "40.73, -74.1",
+                        "bottom_right" : "40.01, -71.12"
                     }
                 }
-        }
+            }
     }
 }
+}
 --------------------------------------------------
 // CONSOLE
 
@@ -195,14 +195,14 @@ GET /_search
             "must" : {
                 "match_all" : {}
             },
-                "filter" : {
-                    "geo_bounding_box" : {
-                        "pin.location" : {
-                            "top_left" : "dr5r9ydj2y73",
-                            "bottom_right" : "drj7teegpus6"
-                        }
+            "filter" : {
+                "geo_bounding_box" : {
+                    "pin.location" : {
+                        "top_left" : "dr5r9ydj2y73",
+                        "bottom_right" : "drj7teegpus6"
                     }
                 }
+            }
         }
     }
 }
@@ -228,16 +228,16 @@ GET /_search
             "must" : {
                 "match_all" : {}
             },
-                "filter" : {
-                    "geo_bounding_box" : {
-                        "pin.location" : {
-                            "top" : 40.73,
-                            "left" : -74.1,
-                            "bottom" : 40.01,
-                            "right" : -71.12
-                        }
+            "filter" : {
+                "geo_bounding_box" : {
+                    "pin.location" : {
+                        "top" : 40.73,
+                        "left" : -74.1,
+                        "bottom" : 40.01,
+                        "right" : -71.12
                     }
                 }
+            }
         }
     }
 }

+ 8 - 8
docs/reference/query-dsl/geo-distance-range-query.asciidoc

@@ -12,16 +12,16 @@ GET /_search
             "must" : {
                 "match_all" : {}
             },
-                "filter" : {
-                    "geo_distance_range" : {
-                        "from" : "200km",
-                        "to" : "400km",
-                        "pin.location" : {
-                            "lat" : 40,
-                            "lon" : -70
-                        }
+            "filter" : {
+                "geo_distance_range" : {
+                    "from" : "200km",
+                    "to" : "400km",
+                    "pin.location" : {
+                        "lat" : 40,
+                        "lon" : -70
                     }
                 }
+            }
         }
     }
 }

+ 18 - 6
docs/reference/query-dsl/geo-polygon-query.asciidoc

@@ -10,7 +10,10 @@ GET /_search
 {
     "query": {
         "bool" : {
-            "must": {
+            "query" : {
+                "match_all" : {}
+            },
+            "filter" : {
                 "geo_polygon" : {
                     "person.location" : {
                         "points" : [
@@ -58,7 +61,10 @@ GET /_search
 {
     "query": {
         "bool" : {
-            "must" : {
+            "query" : {
+                "match_all" : {}
+            },
+            "filter" : {
                 "geo_polygon" : {
                     "person.location" : {
                         "points" : [
@@ -86,8 +92,11 @@ GET /_search
 {
     "query": {
         "bool" : {
-            "must" : {
-                "geo_polygon" : {
+            "query" : {
+                "match_all" : {}
+            },
+            "filter" : {
+               "geo_polygon" : {
                     "person.location" : {
                         "points" : [
                             "40, -70",
@@ -112,8 +121,11 @@ GET /_search
 {
     "query": {
         "bool" : {
-            "must" : {
-                "geo_polygon" : {
+            "query" : {
+                "match_all" : {}
+            },
+            "filter" : {
+               "geo_polygon" : {
                     "person.location" : {
                         "points" : [
                             "drn5x1g8cu2y",

+ 9 - 9
docs/reference/query-dsl/geohash-cell-query.asciidoc

@@ -52,16 +52,16 @@ GET /_search
             "must" : {
                 "match_all" : {}
             },
-                "filter" : {
-                    "geohash_cell": {
-                        "pin": {
-                            "lat": 13.4080,
-                            "lon": 52.5186
-                        },
-                        "precision": 3,
-                        "neighbors": true
-                    }
+            "filter" : {
+                "geohash_cell": {
+                    "pin": {
+                        "lat": 13.4080,
+                        "lon": 52.5186
+                    },
+                    "precision": 3,
+                    "neighbors": true
                 }
+            }
         }
     }
 }

+ 8 - 8
docs/reference/query-dsl/has-child-query.asciidoc

@@ -67,14 +67,14 @@ GET /_search
     "query": {
         "has_child" : {
             "type" : "blog_tag",
-                "score_mode" : "min",
-                "min_children": 2, <1>
-                    "max_children": 10, <1>
-                    "query" : {
-                        "term" : {
-                            "tag" : "something"
-                        }
-                    }
+            "score_mode" : "min",
+            "min_children": 2, <1>
+            "max_children": 10, <1>
+            "query" : {
+                "term" : {
+                    "tag" : "something"
+                }
+            }
         }
     }
 }

+ 1 - 1
docs/reference/query-dsl/ids-query.asciidoc

@@ -11,7 +11,7 @@ GET /_search
     "query": {
         "ids" : {
             "type" : "my_type",
-                "values" : ["1", "4", "100"]
+            "values" : ["1", "4", "100"]
         }
     }
 }    

+ 2 - 6
docs/reference/query-dsl/indices-query.asciidoc

@@ -14,12 +14,8 @@ GET /_search
     "query": {
         "indices" : {
             "indices" : ["index1", "index2"],
-                "query" : {
-                    "term" : { "tag" : "wow" }
-                },
-                "no_match_query" : {
-                    "term" : { "tag" : "kow" }
-                }
+            "query" : { "term" : { "tag" : "wow" } },
+            "no_match_query" : { "term" : { "tag" : "kow" } }
         }
     }
 }

+ 1 - 1
docs/reference/query-dsl/match-phrase-query.asciidoc

@@ -32,7 +32,7 @@ GET /_search
         "match_phrase" : {
             "message" : {
                 "query" : "this is a test",
-                    "analyzer" : "my_analyzer"
+                "analyzer" : "my_analyzer"
             }
         }
     }

+ 4 - 4
docs/reference/query-dsl/match-query.asciidoc

@@ -64,7 +64,7 @@ GET /_search
         "match" : {
             "message" : {
                 "query" : "this is a test",
-                    "operator" : "and"
+                "operator" : "and"
             }
         }
     }
@@ -87,8 +87,8 @@ GET /_search
         "match" : {
             "message" : {
                 "query" : "to be or not to be",
-                    "operator" : "and",
-                    "zero_terms_query": "all"
+                "operator" : "and",
+                "zero_terms_query": "all"
             }
         }
     }
@@ -128,7 +128,7 @@ GET /_search
         "match" : {
             "message" : {
                 "query" : "to be or not to be",
-                    "cutoff_frequency" : 0.001
+                "cutoff_frequency" : 0.001
             }
         }
     }

+ 5 - 5
docs/reference/query-dsl/percolate-query.asciidoc

@@ -23,13 +23,13 @@ PUT /my-index
                 }
             }
         },
-            "queries": {
-                "properties": {
-                    "query": {
-                        "type": "percolator"
-                    }
+        "queries": {
+            "properties": {
+                "query": {
+                    "type": "percolator"
                 }
             }
+        }
     }
 }
 --------------------------------------------------

+ 4 - 4
docs/reference/query-dsl/query-string-query.asciidoc

@@ -11,7 +11,7 @@ GET /_search
     "query": {
         "query_string" : {
             "default_field" : "content",
-                "query" : "this AND that OR thus"
+            "query" : "this AND that OR thus"
         }
     }
 }
@@ -122,7 +122,7 @@ GET /_search
     "query": {
         "query_string" : {
             "fields" : ["content", "name"],
-                "query" : "this AND that"
+            "query" : "this AND that"
         }
     }
 }
@@ -177,8 +177,8 @@ GET /_search
     "query": {
         "query_string" : {
             "fields" : ["city.*"],
-                "query" : "this AND that OR thus",
-                "use_dis_max" : true
+            "query" : "this AND that OR thus",
+            "use_dis_max" : true
         }
     }
 }

+ 2 - 2
docs/reference/query-dsl/regexp-query.asciidoc

@@ -36,7 +36,7 @@ GET /_search
         "regexp":{
             "name.first":{
                 "value":"s.*y",
-                    "boost":1.2
+                "boost":1.2
             }
         }
     }
@@ -54,7 +54,7 @@ GET /_search
         "regexp":{
             "name.first": {
                 "value": "s.*y",
-                    "flags" : "INTERSECTION|COMPLEMENT|EMPTY"
+                "flags" : "INTERSECTION|COMPLEMENT|EMPTY"
             }
         }
     }

+ 3 - 3
docs/reference/query-dsl/terms-query.asciidoc

@@ -89,9 +89,9 @@ GET /tweets/_search
         "terms" : {
             "user" : {
                 "index" : "users",
-                    "type" : "user",
-                    "id" : "2",
-                    "path" : "followers"
+                "type" : "user",
+                "id" : "2",
+                "path" : "followers"
             }
         }
     }