Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3318

LBHttpSolrClient should allow to specify a preferred server for a query

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 6.3
    • None
    • clients - java
    • None

    Description

      For a user query we make several solr queries that differ only slightly and therefore should use/reuse objects cached from the first query (we're using a custom request handler and custom caches).
      Thus such subsequent queries should hit the same solr server.

      The implemented solution looks like this:

      • The client obtains a live SolrServer from LBHttpSolrServer
      • The client provides this SolrServer as preferred server for a query
      • If the preferred server is no longer alive the request is retried on another live server
      • Everything else follows the existing logic:
        • After live servers are exhausted, any servers previously marked as dead will be tried before failing the request
        • If no live servers are found a SolrServerException is thrown

      The implementation is also on github.

      Mailing list thread: http://lucene.472066.n3.nabble.com/LBHttpSolrServer-to-query-a-preferred-server-tt3884140.html

      Attachments

        1. SOLR-3318.git.patch
          16 kB
          Martin Grotzke

        Activity

          People

            Unassigned Unassigned
            martin.grotzke Martin Grotzke
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: