Solr
  1. Solr
  2. SOLR-3313

Rename "Query Type" to "Request Handler" in SolrJ APIs

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: clients - java
    • Labels:
      None

      Description

      Nobody should speak of "query types" any more; it's "request handlers". I understand we want to retain the "qt" parameter as such but I think we should change the names of it wherever we can find it. We can leave some older API methods in place as deprecated.

      As an example, in SolrJ I have to call solrQuery.setQueryType("/blah") instead of setRequestHandler()

        Issue Links

          Activity

          Hide
          Yonik Seeley added a comment -

          Yeah, that makes sense.

          Show
          Yonik Seeley added a comment - Yeah, that makes sense.
          Hide
          Hoss Man added a comment -

          The Admin UI was already updated to reflect this in another issue, so clarifying scope of summary to be specific about SolrJ.

          Show
          Hoss Man added a comment - The Admin UI was already updated to reflect this in another issue, so clarifying scope of summary to be specific about SolrJ.
          Hide
          David Smiley added a comment -

          I'm seeing numerous usages of "query type" as a reference to the query parser too Ugh. I'll clean those up to be "query parser" or similar based on context. An example in QParser.getParser() (my emphasis added with bold):

          BEFORE:

          Create a <code>QParser</code> to parse <code>qstr</code>,
          assuming that the default query type is <code>defaultType</code>.
          The query type may be overridden by local parameters in the query
          string itself. For example if defaultType=<code>"dismax"</code>
          and qstr=<code>foo</code>, then the dismax query parser will be used
          to parse and construct the query object. However
          if qstr=<code>{!prefix f=myfield}foo</code>
          then the prefix query parser will be used.

          public static QParser getParser(String qstr, String defaultType, SolrQueryRequest req) throws ParseException


          AFTER:

          Create a <code>QParser</code> to parse <code>qstr</code>,
          assuming that the default query parser is <code>defaultParser</code>.
          The query parser may be overridden by local parameters in the query
          string itself. For example if defaultParser=<code>"dismax"</code>
          and qstr=<code>foo</code>, then the dismax query parser will be used
          to parse and construct the query object. However
          if qstr=<code>{!prefix f=myfield}foo</code>
          then the prefix query parser will be used.

          public static QParser getParser(String qstr, String defaultParser, SolrQueryRequest req) throws ParseException

          Show
          David Smiley added a comment - I'm seeing numerous usages of "query type" as a reference to the query parser too Ugh. I'll clean those up to be "query parser" or similar based on context. An example in QParser.getParser() (my emphasis added with bold): BEFORE: Create a <code>QParser</code> to parse <code>qstr</code>, assuming that the default query type is <code> defaultType </code>. The query type may be overridden by local parameters in the query string itself. For example if defaultType =<code>"dismax"</code> and qstr=<code>foo</code>, then the dismax query parser will be used to parse and construct the query object. However if qstr=<code>{!prefix f=myfield}foo</code> then the prefix query parser will be used. public static QParser getParser(String qstr, String defaultType , SolrQueryRequest req) throws ParseException AFTER: Create a <code>QParser</code> to parse <code>qstr</code>, assuming that the default query parser is <code> defaultParser </code>. The query parser may be overridden by local parameters in the query string itself. For example if defaultParser =<code>"dismax"</code> and qstr=<code>foo</code>, then the dismax query parser will be used to parse and construct the query object. However if qstr=<code>{!prefix f=myfield}foo</code> then the prefix query parser will be used. public static QParser getParser(String qstr, String defaultParser , SolrQueryRequest req) throws ParseException
          Hide
          David Smiley added a comment -

          Attached is a patch focusing on the renames where the Request Handler was intended. I will use a separate patch for cases where the query parser was intended.

          Show
          David Smiley added a comment - Attached is a patch focusing on the renames where the Request Handler was intended. I will use a separate patch for cases where the query parser was intended.
          Hide
          David Smiley added a comment -

          I committed SOLR-3313_Rename_Query_Type_to_Request_Handler.patch to trunk r1351932 and to 4x r1351933.

          Show
          David Smiley added a comment - I committed SOLR-3313 _Rename_Query_Type_to_Request_Handler.patch to trunk r1351932 and to 4x r1351933.
          Hide
          David Smiley added a comment -

          And attached are renames related to "query type" being a reference to the parser.

          I made some wiki changes here and there too, at least to some of the more current wiki pages.

          Show
          David Smiley added a comment - And attached are renames related to "query type" being a reference to the parser. I made some wiki changes here and there too, at least to some of the more current wiki pages.
          Hide
          David Smiley added a comment -

          Committed to trunk in r1352760 and 4x in r1352761. Closing.

          Show
          David Smiley added a comment - Committed to trunk in r1352760 and 4x in r1352761. Closing.

            People

            • Assignee:
              David Smiley
              Reporter:
              David Smiley
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development