Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ curl -XPOST localhost:9200/test -d '{"mappings": {"BOOSTER": {"properties": {"boostable_str": { "type": "string", "index": "not_analyzed", "omit_norms": "false" }}}}}'
- {"ok":true,"acknowledged":true}
- $ curl -XPUT localhost:9200/test/BOOSTER/DOC-1 -d '{ "boostable_str": {"_value": "boosty string", "_boost": 5}}'
- {"error":"MapperParsingException[failed to parse [boostable_str]]; nested: IllegalArgumentException[You cannot set an index-time boost on an unindexed field, or one that omits norms]; ","status":400}
- $ curl -XGET localhost:9200/test/BOOSTER/_mapping?pretty=Y
- {
- "BOOSTER" : {
- "properties" : {
- "boostable_str" : {
- "type" : "string",
- "index" : "not_analyzed",
- "omit_norms" : true,
- "index_options" : "docs"
- }
- }
- }
- }
- $ curl -XGET localhost:9200/test/BOOSTER/DOC-1?pretty=Y
- {
- "_index" : "test",
- "_type" : "BOOSTER",
- "_id" : "DOC-1",
- "exists" : false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement