Details
-
Bug
-
Resolution: Fixed
-
Minor
-
9.8
-
None
-
Unknown
-
N/A
-
N/A
-
Pull Request accepted
-
Description
The title field in search results using the SOLR endpoint seems to always be null. For example, making a request to
/xwiki/rest/wikis/xwiki/query?type=solr&start=0&number=5&prettyNames=true&distinct=true&q=test&media=json
returns a result like:
{ "links": [ { "href": "...omitted...", "rel": "http://www.xwiki.org/rel/page", "type": null, "hrefLang": null } ], "type": "page", "id": "xwiki:Main.WebHome", "pageFullName": "Main.WebHome", "title": null, "wiki": "xwiki", "space": "Main", "pageName": "WebHome", "modified": 1501282765000, "author": "xwiki:XWiki.msullivan", "authorName": "Matt Sullivan", "version": "5.1", "language": null, "className": null, "objectNumber": null, "filename": null, "score": 59.332226, "object": null }
Looking at the code a bit, it looks like it's trying to populate the title from the "title" field in the solr document. However this field seems to be a multi-lingual field, so it should probably look in the appropriate localized field, e.g. "title_en". I have a PR incoming to fix this.