Solr
  1. Solr
  2. SOLR-5629

SolrIndexSearcher.name should include core name

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7, Trunk
    • Component/s: None
    • Labels:
      None

      Description

      The name attribute on SolrIndexSearcher is used in log lines, but does not include the core name.

      So in a multi-core setup it is unnecessarily difficult to trace what core's searcher is being referred to, e.g. in log lines that provide info on searcher opens & closes.

      One-line patch that helps:

      Replace

      this.name = "Searcher@" + Integer.toHexString(hashCode()) + (name!=null ? " "+name : "");
      

      with

      this.name = "Searcher@" + Integer.toHexString(hashCode()) + "[" + core.getName() + "]" + (name!=null ? " "+name : "");
      

        Activity

        Shikhar Bhushan created issue -
        Erick Erickson made changes -
        Field Original Value New Value
        Assignee Erick Erickson [ erickerickson ]
        Shalin Shekhar Mangar made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.0 [ 12321664 ]
        Fix Version/s 4.7 [ 12325573 ]
        Resolution Fixed [ 1 ]
        David Smiley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Erick Erickson
            Reporter:
            Shikhar Bhushan
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development