Created
July 31, 2014 11:34
-
-
Save Hates/c646120ae1b0494167e0 to your computer and use it in GitHub Desktop.
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
GET media-development/media/_mapping | |
{ | |
"media-development": { | |
"mappings": { | |
"media": { | |
"properties": { | |
"authors": { | |
"type": "string", | |
"fields": { | |
"raw": { | |
"type": "string", | |
"analyzer": "keyword_lowercase" | |
} | |
} | |
}, | |
"language": { | |
"type": "string", | |
"analyzer": "keyword_lowercase" | |
}, | |
"publication_date": { | |
"type": "date", | |
"format": "dateOptionalTime" | |
}, | |
"publisher": { | |
"type": "string" | |
}, | |
"purchases": { | |
"type": "nested", | |
"properties": { | |
"client": { | |
"type": "string" | |
}, | |
"purchase_date": { | |
"type": "date", | |
"format": "dateOptionalTime" | |
} | |
} | |
}, | |
"scripture": { | |
"type": "boolean" | |
}, | |
"subject": { | |
"type": "string", | |
"fields": { | |
"raw": { | |
"type": "string", | |
"analyzer": "keyword_lowercase" | |
} | |
} | |
}, | |
"title": { | |
"type": "string", | |
"fields": { | |
"raw": { | |
"type": "string", | |
"analyzer": "keyword_lowercase" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
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
GET media-development/media/_search | |
{ | |
"fields" : ["authors"], | |
"size": 1, | |
"query": { | |
"match": { | |
"authors.raw": "Joseph Fielding Smith" | |
} | |
} | |
} |
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
{ | |
"took": 1, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 11, | |
"max_score": 10.294406, | |
"hits": [ | |
{ | |
"_index": "media-development", | |
"_type": "media", | |
"_id": "53d8e5ca83368502ac003add", | |
"_score": 10.294406, | |
"fields": { | |
"authors": [ | |
"Joseph Fielding Smith" | |
] | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment