Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Debugging `bool` queries with named queries

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand Down
8 changes: 4 additions & 4 deletions Adding Boolean Logic to Queries/how-the-match-query-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## The two queries below are equivalent

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"match": {
Expand All @@ -14,7 +14,7 @@ GET /recipe/_doc/_search
```

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand All @@ -38,7 +38,7 @@ GET /recipe/_doc/_search
## The two queries below are equivalent

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"match": {
Expand All @@ -52,7 +52,7 @@ GET /recipe/_doc/_search
```

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand Down
12 changes: 6 additions & 6 deletions Adding Boolean Logic to Queries/querying-with-boolean-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Adding query clauses to the `must` key

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand All @@ -29,7 +29,7 @@ GET /recipe/_doc/_search
## Moving the `range` query to the `filter` key

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand Down Expand Up @@ -57,7 +57,7 @@ GET /recipe/_doc/_search
## Adding a query clause to the `must_not` key

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand Down Expand Up @@ -92,7 +92,7 @@ GET /recipe/_doc/_search
## Adding a query clause to the `should` key

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand Down Expand Up @@ -134,7 +134,7 @@ GET /recipe/_doc/_search
## The behavior of `should` query clauses depends

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand All @@ -158,7 +158,7 @@ GET /recipe/_doc/_search
```

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"query": {
"bool": {
Expand Down
4 changes: 2 additions & 2 deletions Aggregations/aggregating-nested-objects.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Aggregating nested objects

```
GET /department/_doc/_search
GET /department/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -15,7 +15,7 @@ GET /department/_doc/_search
```

```
GET /department/_doc/_search
GET /department/default/_search
{
"size": 0,
"aggs": {
Expand Down
4 changes: 2 additions & 2 deletions Aggregations/defining-bucket-rules-with-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Placing documents into buckets based on criteria

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -30,7 +30,7 @@ GET /recipe/_doc/_search
## Calculate average ratings for buckets

```
GET /recipe/_doc/_search
GET /recipe/default/_search
{
"size": 0,
"aggs": {
Expand Down
4 changes: 2 additions & 2 deletions Aggregations/filtering-out-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Filtering out documents with low `total_amount`

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -23,7 +23,7 @@ GET /order/_doc/_search
## Aggregating on the bucket of remaining documents

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand Down
4 changes: 2 additions & 2 deletions Aggregations/global-aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Break out of the aggregation context

```
GET /order/_doc/_search
GET /order/default/_search
{
"query": {
"range": {
Expand Down Expand Up @@ -31,7 +31,7 @@ GET /order/_doc/_search
## Adding aggregation without global context

```
GET /order/_doc/_search
GET /order/default/_search
{
"query": {
"range": {
Expand Down
8 changes: 4 additions & 4 deletions Aggregations/histograms.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Distribution of `total_amount` with interval `25`

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -20,7 +20,7 @@ GET /order/_doc/_search
## Requiring minimum 1 document per bucket

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -38,7 +38,7 @@ GET /order/_doc/_search
## Specifying fixed bucket boundaries

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"query": {
Expand Down Expand Up @@ -67,7 +67,7 @@ GET /order/_doc/_search
## Aggregating by month with the `date_histogram` aggregation

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand Down
2 changes: 1 addition & 1 deletion Aggregations/introduction-to-aggregations.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ PUT /order
## Populating the `order` index with test data

```
curl -H "Content-Type: application/json" -XPOST 'http://localhost:9200/order/_doc/_bulk?pretty' --data-binary "@orders-bulk.json"
curl -H "Content-Type: application/json" -XPOST 'http://localhost:9200/order/default/_bulk?pretty' --data-binary "@orders-bulk.json"
```
10 changes: 5 additions & 5 deletions Aggregations/introduction-to-bucket-aggregations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Creating a bucket for each `status` value

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -19,7 +19,7 @@ GET /order/_doc/_search
## Including `20` terms instead of the default `10`

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -36,7 +36,7 @@ GET /order/_doc/_search
## Aggregating documents with missing field (or `NULL`)

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -54,7 +54,7 @@ GET /order/_doc/_search
## Changing the minimum document count for a bucket to be created

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -73,7 +73,7 @@ GET /order/_doc/_search
## Ordering the buckets

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand Down
8 changes: 4 additions & 4 deletions Aggregations/metric-aggregations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Calculating statistics with `sum`, `avg`, `min`, and `max` aggregations

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand Down Expand Up @@ -34,7 +34,7 @@ GET /order/_doc/_search
## Retrieving the number of distinct values

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -50,7 +50,7 @@ GET /order/_doc/_search
## Retrieving the number of values

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -66,7 +66,7 @@ GET /order/_doc/_search
## Using `stats` aggregation for common statistics

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand Down
12 changes: 6 additions & 6 deletions Aggregations/missing-field-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
## Adding test documents

```
POST /order/_doc/1001
POST /order/default/1001
{
"total_amount": 100
}
```

```
POST /order/_doc/1002
POST /order/default/1002
{
"total_amount": 200,
"status": null
Expand All @@ -20,7 +20,7 @@ POST /order/_doc/1002
## Aggregating documents with missing field value

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -36,7 +36,7 @@ GET /order/_doc/_search
## Combining `missing` aggregation with other aggregations

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -59,9 +59,9 @@ GET /order/_doc/_search
## Deleting test documents

```
DELETE /order/_doc/1001
DELETE /order/default/1001
```

```
DELETE /order/_doc/1002
DELETE /order/default/1002
```
4 changes: 2 additions & 2 deletions Aggregations/nested-aggregations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Retrieving statistics for each status

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"aggs": {
Expand All @@ -26,7 +26,7 @@ GET /order/_doc/_search
## Narrowing down the aggregation context

```
GET /order/_doc/_search
GET /order/default/_search
{
"size": 0,
"query": {
Expand Down
Loading