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

Inconsistent rendering of string versus array of string with regards to unicode escaping #30515

Closed
jobergum opened this issue Mar 8, 2024 · 4 comments
Assignees
Milestone

Comments

@jobergum
Copy link

jobergum commented Mar 8, 2024

curl "http://127.0.0.1:8080/search/?language=no&query=tips+til+naturopplevelser&summary=debug-text-tokens&timeout=10s"

The single valued string field with the term utendørsaktiviteter is rendered without unicode escaping in utf-8, while the array of string is rendered with unicode escaping utend\u00F8rsaktivitet . This doesn't have any practical implications when the response is parsed by a json parser, but it looks weird when using vespa query or curl.

{"root":{"id":"toplevel","relevance":1.0,"fields":{"totalCount":2},"coverage":{"coverage":100,"documents":3,"full":true,"nodes":1,"results":1,"resultsFull":1},"children":[{"id":"id:no:doc::1","relevance":0.09406194235875223,"source":"content","fields":{"sddocname":"doc","documentid":"id:no:doc::1","language":"no","text":"Velkommen til naturopplevelser! I denne guiden deler vi tips om planlegging og forberedelser til utendørsaktiviteter. Enten du planlegger en dagstur i nærområdet eller en lengre fjelltur i nasjonalparken, finner du her nødvendig informasjon og råd for å arrangere en minneverdig tur.","text_tokens":["velkomm","naturopplev","guid","del","tip","planlegging","forbered","utend\u00F8rsaktivitet","ent","planlegg","dagstur","n\u00E6romr\u00E5d","lengr","fjelltur","nasjonalpark","finn","n\u00F8dvend","informasjon","r\u00E5d","arranger","minneverd","tur"]}},{"id":"id:sv:doc::1","relevance":0.034000922612348355,"source":"content","fields":{"sddocname":"doc","documentid":"id:sv:doc::1","language":"sv","text":"Välkommen till naturäventyr! I den här guiden delar vi tips om planering och förberedelser inför utomhusaktiviteter. Oavsett om du planerar en dagsutflykt i närområdet eller en längre vandringsresa i nationalparken, hittar du här nödvändig information och råd för att arrangera en minnesvärd tur.","text_tokens":["v\u00E4lkomm","natur\u00E4ventyr","guid","del","tip","planering","f\u00F6rbered","inf\u00F6r","utomhusaktivitet","oavset","planer","dagsutflyk","n\u00E4romr\u00E5det","l\u00E4ngr","vandringsres","nationalpark","hitt","n\u00F6dv\u00E4nd","information","r\u00E5d","arranger","minnesv\u00E4rd","tur"]}}]}}

Firefox/Chrome json parser will render characters

image

@baldersheim
Copy link
Contributor

And what should it be, with or without ...

@jobergum
Copy link
Author

jobergum commented Mar 8, 2024

Without escaping imho

@kkraune kkraune added this to the soon milestone Mar 13, 2024
@geirst geirst modified the milestones: soon, later May 22, 2024
@arnej27959
Copy link
Member

fixed by
#33045

@jobergum
Copy link
Author

Thank you @arnej27959!

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

5 participants