rs-pro / mongoid-elasticsearch

DEPRECATED - Consider using SearchKick https://github.com/ankane/searchkick
MIT License
61 stars 23 forks source link

Search by some criteria #5

Closed avdept closed 10 years ago

avdept commented 10 years ago

How do i pass some extra parameters to search method, so it would search only within this scope? Lets say i have current_user. current_user has some relation, like current_user.custom_relation_objects

How do i search only within these custom_relation_objects?

Also, how do i sort all these objects by some attribute?

glebtv commented 10 years ago

All queries use raw elastiscearch json requests. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-term-filter.html