Created
January 21, 2015 16:17
-
-
Save nikravi/81dcef4b9a656c96ecd5 to your computer and use it in GitHub Desktop.
Revisions
-
nikravi created this gist
Jan 21, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,59 @@ GET videos/episode/_search { "size": 20, "query": { "query_string": { "query": "summer" } } } //query for any text inside a field //return only part of the json (_source) GET videos/episode/_search { "size": 20, "query": { "query_string": { "query": "*", "fields": [ "rights.territory.type"] } }, "_source": ["restrictions", "rights"] } //query for missing fields, like null, or non-existent fields. GET videos/episode/_search { "size": 10, "query": { "filtered": { "filter": { "missing": { "field": "rights.ownership" } } } }, "_source": [ "restrictions", "rights"] } //query by id GET videos/episode/_search { "size": 20, "query": { "query_string": { "query": 10620, "fields": [ "ids.scrid" ] } }, "_source": [ "restrictions", "rights"] }