I am building an application in ruby on rails which makes use of Solr 4. To support Solr 4 in my application I am using the rSolr gem. I am trying to parse a query and let the resulting documents be grouped on a number. The querying doesn't form a problem, but I can't seem to find the correct syntax to tell rSolr to parse the group part. Does anyone know what the correct syntax is?
Group documents with rSolr
213 Views Asked by Denis At
2
There are 2 best solutions below
Related Questions in RUBY-ON-RAILS
- Rails HABTM: Select everything a that a record 'has'
- Best way to make an HABTM association via console
- dynamically create an ical / ics file from a rails model
- Ruby destroy is not working? Or objects still present?
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Select results where joined table contains records with an attribute, but without another
- Showing posts only created when boolean was true
- Ruby on rails and HAML - Print a hash with background color
- How can I monitor an endpoint's status with Ruby?
- How to create dynamic pages without form_for helper in Rails?
- Rails 4.2 jQuery loads only after refresh
- "Access Denied" - User's Permissions to S3 Bucket
- ActiveRecord, Rails 4: has_many :through with scoped conditions failure
- Rails - formatting a list of options
- Rails - Ajax do not work properly on production server
Related Questions in GROUPING
- Using Table to Group: invalid 'type' (character) of argument
- SQL Server Multiple Groupings
- Cell of grouped elements
- Sorting and Grouping of Korean Character (Not familiar with Korean language)
- Display array items in groups
- BaseX XQuery error: root(): no context value bound
- Group MySQL results into blocks of A-Z in PHP
- aggregate rows using datatable
- Group By and CASE query in LinQ
- How can segregate data groups using apache PIG
- java8 stream grouping and sorting on aggregate sum
- SSRS - white space issue in column group
- How to aggregate data with the dyplr package in R
- How to display items of groups in AngularJS?
- Grouping and searching text in ListView in WPF
Related Questions in SOLR4
- Solr ping taking time during full import
- Solr result has not expected order
- Solr synonyms - Issue with word containing wild card
- Speeding up Solr Search By Split
- Codec mismatch exception while using checkindex of solr
- Solrcloud & data import handler
- SolrJ solr query for boolean params getting undefined field exception
- how to remove dash/hypen from solr?
- Solr Admin Page Shows No Information
- Solr - always sort specific subset to last of collection
- How do I perform a partial search while preserving order using solr?
- Solr return empty result when search "OMG!*"
- Solr Change string field to integer multivalued
- How to get Solr result as per their scores
- What are the required libraries for solr custom function?
Related Questions in RSOLR
- How to upload a file with rsolr?
- which is better gem for solr cloud setup in rails 4.1 application for aws hosting,I had researched some gems as below
- Why Solr match data and count mismatch while using group.limit?
- Ruby 2.3.1 how to set the project root directory in config.rb
- rsolr not returning facet fields
- SSL Support for sunspot (solr) requests
- How to soft-commit in Sunspot (Solr 4)?
- Using Ruby variable in Rsolr requests
- "Sunspot" Gem makes distinction between UTF-8 chars
- solr newly added documents on indexes not reflected before restart
- Rsolr::Ext return undefined method `to_i' for ["10", "10"]:Array
- When should I create Solr connection in a Rails app
- Query solr cluster for state of nodes
- sunspot heroku websolr authorization
- Fetch top terms with sunspot
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After a little research I found the answer to my problem. I was using functionality, the find method to be specific, from the rsolr-ext gem which doesn't support grouping:
This will raise an error in the rsolr-ext gem because it can't parse the "group.field" part of the hash. Without it, Solr doesn't know where to group on.
The answer was quite simple. Just use the select method from the rsolr gem:
This works perfectly.