Skip to content

Commit

Permalink
Docs: Added array include/exclude example back into terms agg
Browse files Browse the repository at this point in the history
  • Loading branch information
clintongormley committed Sep 8, 2015
1 parent c262500 commit 63f4af5
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,29 @@ http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#UNICODE_CH
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#UNIX_LINES[`UNIX_LINES`]


For matching based on exact values the `include` and `exclude` parameters can simply take an array of
strings that represent the terms as they are found in the index:

[source,js]
--------------------------------------------------
{
"aggs" : {
"JapaneseCars" : {
"terms" : {
"field" : "make",
"include" : ["mazda", "honda"]
}
},
"ActiveCarManufacturers" : {
"terms" : {
"field" : "make",
"exclude" : ["rover", "jensen"]
}
}
}
}
--------------------------------------------------

==== Multi-field terms aggregation

The `terms` aggregation does not support collecting terms from multiple fields
Expand Down

0 comments on commit 63f4af5

Please sign in to comment.