Advertisement
Guest User

Untitled

a guest
Nov 13th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. $ curl -XPOST localhost:9200/test -d '{"mappings": {"BOOSTER": {"properties": {"boostable_str": { "type": "string", "index": "not_analyzed", "omit_norms": "false" }}}}}'
  2. {"ok":true,"acknowledged":true}
  3.  
  4. $ curl -XPUT localhost:9200/test/BOOSTER/DOC-1 -d '{ "boostable_str": {"_value": "boosty string", "_boost": 5}}'
  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}
  6.  
  7. $ curl -XGET localhost:9200/test/BOOSTER/_mapping?pretty=Y
  8. {
  9. "BOOSTER" : {
  10. "properties" : {
  11. "boostable_str" : {
  12. "type" : "string",
  13. "index" : "not_analyzed",
  14. "omit_norms" : true,
  15. "index_options" : "docs"
  16. }
  17. }
  18. }
  19. }
  20.  
  21. $ curl -XGET localhost:9200/test/BOOSTER/DOC-1?pretty=Y
  22. {
  23. "_index" : "test",
  24. "_type" : "BOOSTER",
  25. "_id" : "DOC-1",
  26. "exists" : false
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement