Created
March 16, 2015 08:51
-
-
Save jprante/da2980446108b5c112a8 to your computer and use it in GitHub Desktop.
Doc values with multi-field
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 characters
curl -XDELETE 'localhost:9200/test' | |
curl -XPUT 'localhost:9200/test' -d ' | |
{ | |
"mappings" : { | |
"docs" : { | |
"properties" : { | |
"content" : { | |
"type" : "string", | |
"index" : "not_analyzed", | |
"doc_values" : true, | |
"fields" : { | |
"analyzed_content" : { | |
"type" : "string", | |
"analyzer" : "standard" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
' | |
curl -XPUT 'localhost:9200/test/docs/1' -d ' | |
{ | |
"content": "Hello World" | |
} | |
' | |
curl -XGET 'localhost:9200/test/_refresh' | |
curl -XGET 'localhost:9200/test/docs/_search?pretty' -d ' | |
{ | |
"query" : { | |
"match" : { | |
"content" : "Hello World" | |
} | |
} | |
} | |
' | |
curl -XGET 'localhost:9200/test/docs/_search?pretty' -d ' | |
{ | |
"query" : { | |
"match" : { | |
"analyzed_content" : "Hello World" | |
} | |
} | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment