Feb 2nd, 2013, 02:04 PM
Getting a minimum number of results to a solr query
Can anywone help me with this problem?
I'm using Spring data solr, and I want to build a query that return at least x results, in the following way:
Let's say that I want 100 results, and query1 brings me 70.
I want to use query2 (which will be a more general query) to get the other 30 results and append them after the 70 that query1 found.
Doe's anywone know of a spring-solr mechanism that can achive this?
Mar 4th, 2013, 01:01 AM
you could use a custom repository implementation and execute the 2 queries using SolrOperations, then merge the results, remove duplicates (as I assume there will be some) and return a new Page with the merged content.
Mar 4th, 2013, 08:02 AM
Thank You very much for your answer Christoph.
Thats exactly what I eventually did.