Created
April 22, 2014 13:30
-
-
Save skakri/11179326 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
// Comments and commas for syntax | |
highlighting = [ | |
//POST test | |
{ | |
"settings": { | |
"analysis": { | |
"filter": { | |
"synonym": { | |
"synonyms_path": "/usr/share/wordnet-prolog/wn_s.pl", | |
"ignore_case": "true", | |
"type": "synonym", | |
"format": "wordnet" | |
} | |
}, | |
"analyzer": { | |
"synonym_analyzer": { | |
"char_filter": "html_strip", | |
"filter": [ | |
"asciifolding", | |
"snowball", | |
"synonym" | |
], | |
"type": "custom", | |
"tokenizer": "lowercase" | |
} | |
} | |
} | |
}, | |
"mappings": { | |
"child": { | |
"_parent": { | |
"type": "parent" | |
} | |
} | |
} | |
} | |
, | |
//PUT test/parent/1 | |
{ | |
"type": "flying stuff" | |
} | |
, | |
//PUT test/child/1?parent=1 | |
{ | |
"name": "butterfly" | |
} | |
, | |
//PUT test/child/2?parent=1 | |
{ | |
"name": "<strong>tire</strong>" | |
} | |
, | |
//GET test/parent/_search | |
{ | |
"query": { | |
"has_child": { | |
"type": "child", | |
"query": { | |
"match": { | |
"name": { | |
"query": "strong", | |
"analyzer": "synonym_analyzer" | |
} | |
} | |
} | |
} | |
} | |
} | |
, | |
//GET test/child/_search | |
{ | |
"query": { | |
"match": { | |
"name": { | |
"query": "strong", | |
"analyzer": "synonym_analyzer" | |
} | |
} | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment