Results 1 to 3 of 3

Thread: Getting a minimum number of results to a solr query

  1. #1
    Join Date
    Feb 2013
    Posts
    2

    Default 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. #2
    Join Date
    Oct 2012
    Posts
    3

    Default

    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

  3. #3
    Join Date
    Feb 2013
    Posts
    2

    Default

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

    Best Regards,
    Idan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •