Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16064

The REST query API on a subwiki should default to the SOLR query language

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.11
    • Fix Version/s: None
    • Component/s: REST
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Steps to reproduce

      Visit the subwiki REST query endpoint at:

      /xwiki/rest/wikis/xwiki/query

      Actual result

      The following XML response is sent by the server, mentioning that the "type" parameter is optional. However, when no type is specified, it seems that the query is not executed at all, so it's probably better to mark this parameter as mandatory (as it is in the REST API documentation), isn't it? Otherwise, the user might understand that no result matches the entered query, which is not meaningful since the query is not executed. Note that the /xwiki/rest/wikis/query endpoint uses the SOLR query syntax, so one would typically expect that either the default type is "solr", or that it is mandatory.

      <searchResults template="https://www.myxwiki.org/xwiki/rest/wikis/xwiki/query?q={query}(&type={type})(&number={number})(&start={start})(&orderField={fieldname}(&order={asc|desc}))(&distinct=1)(&prettyNames={false|true})(&wikis={wikis})(&className={classname})"/>

      Expected result

      <searchResults template="https://www.myxwiki.org/xwiki/rest/wikis/xwiki/query?q={query}&type={type}(&number={number})(&start={start})(&orderField={fieldname}(&order={asc|desc}))(&distinct=1)(&prettyNames={false|true})(&wikis={wikis})(&className={classname})"/>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              slauriere slauriere
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: