-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
`AbstractFilteringTestCase` had a ton of carefully formatted `XContentBuilder` calls that would have been totally unreadable after the formatter worked its magic. So I formatted a bunch of them by hand and extracted the rest to json files.
- Loading branch information
Showing
25 changed files
with
1,336 additions
and
1,405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,351 changes: 180 additions & 1,171 deletions
1,351
...er/src/test/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java
Large diffs are not rendered by default.
Oops, something went wrong.
442 changes: 208 additions & 234 deletions
442
server/src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
server/src/test/resources/org/elasticsearch/common/xcontent/support/sample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"title" : "My awesome book", | ||
"pages" : 456, | ||
"price" : 27.99, | ||
"timestamp" : 1428582942867, | ||
"default" : null, | ||
"tags" : [ | ||
"elasticsearch", | ||
"java" | ||
], | ||
"authors" : [ | ||
{ | ||
"name" : "John Doe", | ||
"lastname" : "John", | ||
"firstname" : "Doe" | ||
}, | ||
{ | ||
"name" : "William Smith", | ||
"lastname" : "William", | ||
"firstname" : "Smith" | ||
} | ||
], | ||
"properties" : { | ||
"weight" : 0.8, | ||
"language" : { | ||
"en" : { | ||
"lang" : "English", | ||
"available" : true, | ||
"distributors" : [ | ||
{ | ||
"name" : "The Book Shop", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1", | ||
"street" : "Hampton St", | ||
"city" : "London" | ||
}, | ||
{ | ||
"name" : "address #2", | ||
"street" : "Queen St", | ||
"city" : "Stornoway" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Sussex Books House" | ||
} | ||
] | ||
}, | ||
"fr" : { | ||
"lang" : "French", | ||
"available" : false, | ||
"distributors" : [ | ||
{ | ||
"name" : "La Maison du Livre", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1", | ||
"street" : "Rue Mouffetard", | ||
"city" : "Paris" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Thetra" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
server/src/test/resources/org/elasticsearch/common/xcontent/support/sample_just_authors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"authors" : [ | ||
{ | ||
"name" : "John Doe", | ||
"lastname" : "John", | ||
"firstname" : "Doe" | ||
}, | ||
{ | ||
"name" : "William Smith", | ||
"lastname" : "William", | ||
"firstname" : "Smith" | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
...est/resources/org/elasticsearch/common/xcontent/support/sample_just_authors_lastname.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"authors" : [ | ||
{ | ||
"lastname" : "John" | ||
}, | ||
{ | ||
"lastname" : "William" | ||
} | ||
] | ||
} |
47 changes: 47 additions & 0 deletions
47
server/src/test/resources/org/elasticsearch/common/xcontent/support/sample_just_names.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"authors" : [ | ||
{ | ||
"name" : "John Doe" | ||
}, | ||
{ | ||
"name" : "William Smith" | ||
} | ||
], | ||
"properties" : { | ||
"language" : { | ||
"en" : { | ||
"distributors" : [ | ||
{ | ||
"name" : "The Book Shop", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1" | ||
}, | ||
{ | ||
"name" : "address #2" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Sussex Books House" | ||
} | ||
] | ||
}, | ||
"fr" : { | ||
"distributors" : [ | ||
{ | ||
"name" : "La Maison du Livre", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Thetra" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
server/src/test/resources/org/elasticsearch/common/xcontent/support/sample_just_pr.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"price" : 27.99, | ||
"properties" : { | ||
"weight" : 0.8, | ||
"language" : { | ||
"en" : { | ||
"lang" : "English", | ||
"available" : true, | ||
"distributors" : [ | ||
{ | ||
"name" : "The Book Shop", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1", | ||
"street" : "Hampton St", | ||
"city" : "London" | ||
}, | ||
{ | ||
"name" : "address #2", | ||
"street" : "Queen St", | ||
"city" : "Stornoway" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Sussex Books House" | ||
} | ||
] | ||
}, | ||
"fr" : { | ||
"lang" : "French", | ||
"available" : false, | ||
"distributors" : [ | ||
{ | ||
"name" : "La Maison du Livre", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1", | ||
"street" : "Rue Mouffetard", | ||
"city" : "Paris" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Thetra" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
.../org/elasticsearch/common/xcontent/support/sample_just_properties_distributors_names.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"properties" : { | ||
"language" : { | ||
"en" : { | ||
"distributors" : [ | ||
{ | ||
"name" : "The Book Shop" | ||
}, | ||
{ | ||
"name" : "Sussex Books House" | ||
} | ||
] | ||
}, | ||
"fr" : { | ||
"distributors" : [ | ||
{ | ||
"name" : "La Maison du Livre" | ||
}, | ||
{ | ||
"name" : "Thetra" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
.../resources/org/elasticsearch/common/xcontent/support/sample_just_properties_en_names.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"properties" : { | ||
"language" : { | ||
"en" : { | ||
"distributors" : [ | ||
{ | ||
"name" : "The Book Shop", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1" | ||
}, | ||
{ | ||
"name" : "address #2" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Sussex Books House" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...rch/common/xcontent/support/sample_just_properties_en_no_distributors_name_no_street.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"properties" : { | ||
"language" : { | ||
"en" : { | ||
"lang" : "English", | ||
"available" : true, | ||
"distributors" : [ | ||
{ | ||
"name" : "The Book Shop", | ||
"addresses" : [ | ||
{ | ||
"city" : "London" | ||
}, | ||
{ | ||
"city" : "Stornoway" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Sussex Books House" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...est/resources/org/elasticsearch/common/xcontent/support/sample_just_properties_names.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"properties" : { | ||
"language" : { | ||
"en" : { | ||
"distributors" : [ | ||
{ | ||
"name" : "The Book Shop", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1" | ||
}, | ||
{ | ||
"name" : "address #2" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Sussex Books House" | ||
} | ||
] | ||
}, | ||
"fr" : { | ||
"distributors" : [ | ||
{ | ||
"name" : "La Maison du Livre", | ||
"addresses" : [ | ||
{ | ||
"name" : "address #1" | ||
} | ||
] | ||
}, | ||
{ | ||
"name" : "Thetra" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...ces/org/elasticsearch/common/xcontent/support/sample_just_properties_no_distributors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"properties" : { | ||
"weight" : 0.8, | ||
"language" : { | ||
"en" : { | ||
"lang" : "English", | ||
"available" : true | ||
}, | ||
"fr" : { | ||
"lang" : "French", | ||
"available" : false | ||
} | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...resources/org/elasticsearch/common/xcontent/support/sample_just_tags_authors_no_name.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"tags" : [ | ||
"elasticsearch", | ||
"java" | ||
], | ||
"authors" : [ | ||
{ | ||
"lastname" : "John", | ||
"firstname" : "Doe" | ||
}, | ||
{ | ||
"lastname" : "William", | ||
"firstname" : "Smith" | ||
} | ||
] | ||
} |
Oops, something went wrong.