Solr
  1. Solr
  2. SOLR-7108

Change PingRequestHandler hard-coded troublesome query

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      PingRequestHandler hard-codes this:

      ping.initArgs.add(INVARIANTS, new NamedList<>(makeMap("echoParams", "all", "q", "solrpingquery")));
      

      which unnecessarily relies on query parsing settings like default field. In the case of the basic_configs core this causes a failed request because df isn't set appropriately).

      1. SOLR-7108.patch
        13 kB
        Marius Grama

        Issue Links

          Activity

          Hide
          Erik Hatcher added a comment -

          Let's switch the query to something like

          {!lucene}*:*
          

          so that it will always parse and execute correctly.

          Show
          Erik Hatcher added a comment - Let's switch the query to something like {!lucene}*:* so that it will always parse and execute correctly.
          Hide
          Marius Grama added a comment - - edited

          Attached is a patch for the reported issue containing changes in the configuration files, ImplicitPlugins.java as well as unit tests for accuracy and failure of the PingRequestHandler.

          I had a look on how the ping requests are handled and discovered within the QueryComponent line 144

          String defType = params.get(QueryParsing.DEFTYPE, QParserPlugin.DEFAULT_QTYPE);
          

          that the default query parser is the lucene parser

          QParserPlugin.DEFAULT_QTYPE = lucene

          reason why the hint

          {!lucene}*:*

          that the Lucene query parser should be used is not necessary. This is why I used

          *:*

          query parameter value.

          Show
          Marius Grama added a comment - - edited Attached is a patch for the reported issue containing changes in the configuration files, ImplicitPlugins.java as well as unit tests for accuracy and failure of the PingRequestHandler. I had a look on how the ping requests are handled and discovered within the QueryComponent line 144 String defType = params.get(QueryParsing.DEFTYPE, QParserPlugin.DEFAULT_QTYPE); that the default query parser is the lucene parser QParserPlugin.DEFAULT_QTYPE = lucene reason why the hint {!lucene}*:* that the Lucene query parser should be used is not necessary. This is why I used *:* query parameter value.
          Hide
          ASF subversion and git services added a comment -

          Commit 1684071 from Erik Hatcher in branch 'dev/trunk'
          [ https://svn.apache.org/r1684071 ]

          SOLR-7108: Change default query used by /admin/ping to not rely on other parameters such as query parser or default field

          Show
          ASF subversion and git services added a comment - Commit 1684071 from Erik Hatcher in branch 'dev/trunk' [ https://svn.apache.org/r1684071 ] SOLR-7108 : Change default query used by /admin/ping to not rely on other parameters such as query parser or default field
          Hide
          ASF subversion and git services added a comment -

          Commit 1684073 from Erik Hatcher in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1684073 ]

          SOLR-7108: Change default query used by /admin/ping to not rely on other parameters such as query parser or default field (merged from trunk r1684071)

          Show
          ASF subversion and git services added a comment - Commit 1684073 from Erik Hatcher in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684073 ] SOLR-7108 : Change default query used by /admin/ping to not rely on other parameters such as query parser or default field (merged from trunk r1684071)
          Hide
          Erik Hatcher added a comment -

          resolved. Marius Grama - The query parser is needed to be entirely sure because /admin/ping will use a select handler (defaults /select) to execute the query which could specify defType and cause issues; better safe(r) than sorry.

          Show
          Erik Hatcher added a comment - resolved. Marius Grama - The query parser is needed to be entirely sure because /admin/ping will use a select handler (defaults /select) to execute the query which could specify defType and cause issues; better safe(r) than sorry.
          Hide
          Erik Hatcher added a comment - - edited

          In addition, perhaps all those /admin/ping's explicitly defined should be removed so the default/implicit configuration is used. - spun off SOLR-7645 for this broader than ping cleanup task.

          Show
          Erik Hatcher added a comment - - edited In addition, perhaps all those /admin/ping's explicitly defined should be removed so the default/implicit configuration is used. - spun off SOLR-7645 for this broader than ping cleanup task.
          Hide
          Shalin Shekhar Mangar added a comment -

          Bulk close for 5.3.0 release

          Show
          Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

            People

            • Assignee:
              Erik Hatcher
              Reporter:
              Erik Hatcher
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development