Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
10.11
-
None
-
Unknown
-
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})"/>