Guest User

Untitled

a guest
Nov 13th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 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. {"ok":true,"_index":"test","_type":"BOOSTER","_id":"DOC-1","_version":1}
  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. }
  15. }
  16. }
  17. }
  18.  
  19. $ curl -XGET localhost:9200/test/BOOSTER/DOC-1?pretty=Y
  20. {
  21. "_index" : "test",
  22. "_type" : "BOOSTER",
  23. "_id" : "DOC-1",
  24. "_version" : 1,
  25. "exists" : true, "_source" : { "boostable_str": {"_value": "boosty string", "_boost": 5}}
  26. }
Advertisement
Add Comment
Please, Sign In to add comment