mwmitchell-rsolr_ext 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +16 -4
- data/lib/rsolr_ext.rb +1 -1
- data/rsolr_ext.gemspec +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
|
@@ -9,14 +9,26 @@ A set of helper methods/modules to assist in building Solr queries and handling
|
|
|
9
9
|
|
|
10
10
|
The params hash can then be passed into RSolr for fielded querying.
|
|
11
11
|
|
|
12
|
+
===Base
|
|
13
|
+
solr_hash = {} # an evaluated solr (ruby) response hash
|
|
14
|
+
response = RSolrExt::Response::Base.create(solr_hash)
|
|
15
|
+
|
|
12
16
|
===Select
|
|
13
|
-
solr_hash = {} # an evaluated solr (ruby) hash
|
|
17
|
+
solr_hash = {} # an evaluated solr (ruby) response hash
|
|
14
18
|
response = RSolrExt::Response::Select.create(solr_hash)
|
|
15
19
|
response.docs.each do |d|
|
|
16
20
|
puts d[:cat]
|
|
17
21
|
end
|
|
18
22
|
puts response.facets.inspect
|
|
19
|
-
|
|
23
|
+
|
|
20
24
|
====Pagination
|
|
21
|
-
In your view (using will_paginate):
|
|
22
|
-
<%= will_paginate(response) %>
|
|
25
|
+
When using the RSolrExt::Response::Select extension, pagination becomes very easy. In your view (using will_paginate):
|
|
26
|
+
<%= will_paginate(response) %>
|
|
27
|
+
|
|
28
|
+
===Update
|
|
29
|
+
solr_hash = {} # an evaluated solr (ruby) response hash
|
|
30
|
+
response = RSolrExt::Response::Update.create(solr_hash)
|
|
31
|
+
|
|
32
|
+
===Luke
|
|
33
|
+
solr_hash = {} # an evaluated solr (ruby) response hash
|
|
34
|
+
response = RSolrExt::Response::Luke.create(solr_hash)
|
data/lib/rsolr_ext.rb
CHANGED
data/rsolr_ext.gemspec
CHANGED