You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.
maciejkowalski edited this page Sep 24, 2012
·
3 revisions
Tire supports two types of queries:
Queries using the Tire DSL
Queries the elastic search query REST DSL directly
In this section we'll discuss #2.
The most obvious utility for querying the REST DSL is when you either
A query need a feature not supported by the Tire DSL.
An application is migrated from another integration to Tire (e.g escargot)
A developer prefers the REST DSL.
Please keep in mind that the Tire query logging feature, that helps in debugging, does not work for the REST DSL.
For queries not supported by the Tire query DSL use 'Tire.search' directly like:
# Will match all documents in the 'events' elastic search index 'events' collectionsearch_results=Tire.search'events',:query=>{"match_all"=>{}}forresultinsearch_resultslogger.debug"This is a search result: #{result}"end
Also please remember to set pagination variables. Otherwise pagination will NOT work correctly.