Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quepid renders OpenSearch fields inconsistently/incorrectly #1007

Open
wrigleyDan opened this issue Apr 25, 2024 · 1 comment
Open

Quepid renders OpenSearch fields inconsistently/incorrectly #1007

wrigleyDan opened this issue Apr 25, 2024 · 1 comment

Comments

@wrigleyDan
Copy link
Contributor

Describe the bug
Quepid renders the content of the field overview when retrieved in OpenSearch incorrectly as an array. This potentially means that there is a general problem of displaying field values correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Bring OpenSearch up and running, the following steps assume os-tmdb to be up an running
  2. Initialize a case pointing to OpenSearch and make sure to include the field overview to the return fields
  3. Include a query that returns results, e.g. rambo
  4. Expand the results and you will see that the value OpenSearch returns

Expected behavior
The expected behavior is that the field value of the overview field and any other field is rendered correctly, like in the identical case for Solr. See screenshots for comparison.

Screenshots
OpenSearch: overview field interpreted as mutli-valued field/array
image

Solr: no issue with the overview field
image

Additional context
The field overview does not seem to be multi-valued, so there's no obvious reason for it being interpreted in the described way. In fact, even a multi-valued field is not interpreted in that way. See screenshot for an example of a multi-valued field directors.
image

Spotted by @christian-cg

@epugh
Copy link
Member

epugh commented Apr 29, 2024

Thanks for reporting this. There has been a lot of "back and forth" in the multivalued array/json parsing area for both ES and OS.... Some of it influenced by the desire to be able to "pluck" some json. I think we had some sort of notion like you could do a fieldspec like overview[0] to just get the first item in the array. Or event a more complex json data structure like cast.first_name and it would get all the first_name's if you had a hash of first_name objects in the cast array.... I'd love a fresh set of eyes on this code, and better unit testing that demonstrates the expected behavior is the real behavior ;-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants