Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
  "_id": 1,| # Basic key operators to query the JSON objects : | |
| # #> : Get the JSON object at that path (if you need to do something fancy) | |
| # -> : Get the JSON object at that path (if you don't) | |
| # ->> : Get the JSON object at that path as text | |
| # {obj, n} : Get the nth item in that object | |
| # https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE | |
| # Date | |
| # date before today | 
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
  "_id": 1,curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products.json
curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products/706676762.json
curl -i -X PUT -H "X-Spree-Token: YOUR_TOKEN_ID" -d "product[name]=Headphones" http://0.0.0.0:3000/api/products/706676762.json
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') | 
| //= require jquery | |
| //= require jquery_ujs | |
| $(function() { | |
| var source = new EventSource('/stream'); | |
| source.addEventListener('counter', function(e) { | |
| $('body').after(e.data + '<br />'); | |
| }); | |
| }); |