Skip to content

Instantly share code, notes, and snippets.

View augustl's full-sized avatar

August Lilleaas augustl

  • Oslo, Norway
View GitHub Profile
@augustl
augustl / output.txt
Last active December 10, 2015 00:38 — forked from anonymous/output.txt
{"ok":true,"acknowledged":true}
{"ok":true,"_index":"rctest","_type":"attendants","_id":"123","_version":1}
{"ok":true,"_index":"rctest","_type":"attendants","_id":"321","_version":1}
*** REFRESH
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}}
*** All documents
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.0,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":1.0, "_source" : {"is_cool":false}},{"_index":"rctest","_type":"attendants","_id":"123","_score":1.0, "_source" : {"is_cool":true}}]}}
*** Result of query A
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
*** Result of Query A as query params
l1 = Laender.create(:short => 'global', :name => 'Global', :img18x12_url => '/images/laender/global.png')
l2 = Laender.create(:short => 'eu', :name => 'Europe', :img18x12_url => '/images/laender/eu.png')
Clan.create(:own => 't', :name => 'Titans', :tag => 'ti', :laender_id => l1.id, :homepage_url => 'www.titans.de.ms')
# or...
Clan.create(:own => 't', :name => 'Titans', :tag => 'ti', :laender => l1, :homepage_url => 'www.titans.de.ms')
<%= render :partial => "entry_big", :object => @entries.first %>
<%= render :partial => "entry_small", :collection => @entries[1..-1] %>