Announcement Announcement Module
Collapse
No announcement yet.
Getting a minimum number of results to a solr query Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting a minimum number of results to a solr query

    Hello,
    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?

    Thanks,
    Idan

  • #2
    Hi Idan,
    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.

    Cheers, Christoph

    Comment


    • #3
      Thank You very much for your answer Christoph.
      Thats exactly what I eventually did.

      Best Regards,
      Idan

      Comment

      Working...
      X