IBM / watson-discovery-news

A Node.js web app that uses the Watson Discovery News service to query and view the latest trending news items.
https://developer.ibm.com/patterns/create-a-cognitive-news-search-app/
Apache License 2.0
41 stars 60 forks source link

replace -_score with -score #40

Closed stevemar closed 6 years ago

stevemar commented 6 years ago

we had a comment on an old PR [1] to replace -_score with -score in query_builder.py. The comment is still valid from a code point of view [2], but i'm not sure if it's a valid change/suggestion, so i'm filing this bug so we don't forget about it.

[1] https://github.com/IBM/watson-discovery-news/commit/5230762109db924c6db695c0890451c3b7fcc257#commitcomment-26180042 [2] https://github.com/IBM/watson-discovery-news/blob/master/server/query-builder.js#L40

rhagarty commented 6 years ago

I just started seeing this issue in another Watson Discovery app which also used the '-_score' as the sort key. It returned the error "Error: [_score] unknown field [unmapped_type], parser not found".

Changing to '-score' fixed the problem.