-
Notifications
You must be signed in to change notification settings - Fork 442
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
Highlight for hierarchical fields not working #1343
Comments
Hiya could you share the configuration aswell? Maybe there’s a bug here with object fields |
I'm afraid it's too simple to contain any bugs, but let's have a look:
Maybe for completeness, the rest of the code:
Adding the Configure-Component was a hint I received from the Algolia guys, but it had no effect. |
could you try this with another field thats not using object field? IE, make |
I've already checked this yesterday and I just realized that I did not submit my comment. -.-
|
sounds like a bug within Searchkit for highlighting on object fields. This is the code for highlighting and tests. Likely will take me next weekend to look into this but very happy for a PR to resolve the issue if you can. Joe |
found the issue that instantsearch requires object fields to be represented in a object hierarchy, not currently as a 1 depth dot notation keys. Fixed this by transforming ES dot notation keys into an object hierarchy. Got a PR fixing this and should work. Let me know if you have issues. |
The problem
I'm currently evaluating SearchKit and struggle with the highlighting of matches. According to the documentation, it should work intuitively, but if I follow the documentation, my highlight component never contains any value for hierarchical fields. The only chance is to modify the result by storing the highlight result in an attribute without hierarchy separator. For more information, please see the details section. I've already opened an issue at algolia/instantsearch but I they send me here.
Environment
Details
According to the documentation, using the highlight component for hierarchical fields should work for the following example hit:
as follows:
Instead, the highlight component is is rendered but empty. If I change the attribute key as follows:
the following works:
The text was updated successfully, but these errors were encountered: