Module: SimpleSolrClient::Core::Search
- Included in:
- SimpleSolrClient::Core
- Defined in:
- lib/simple_solr_client/core/search.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
12 13 14 |
# File 'lib/simple_solr_client/core/search.rb', line 12 def all fv_search('*', '*') end |
#fv_search(field, value) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/simple_solr_client/core/search.rb', line 5 def fv_search(field, value) v = value v = SimpleSolrClient.lucene_escape Array(value).join(' ') unless v == '*' kv = "#{field}:(#{v})" get('select', {:q => kv}, SimpleSolrClient::Response::QueryResponse) end |
#id(i) ⇒ Object
16 17 18 |
# File 'lib/simple_solr_client/core/search.rb', line 16 def id(i) fv_search('id', i).first end |