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

Support unified highlighting #205

Open
chrinor2002 opened this issue Dec 4, 2024 · 0 comments
Open

Support unified highlighting #205

chrinor2002 opened this issue Dec 4, 2024 · 0 comments

Comments

@chrinor2002
Copy link

chrinor2002 commented Dec 4, 2024

Issue

Unable to set highlighting to unified. For example:

const esb = require('elastic-builder'); // the builder

const highlight = esb.highlight();
highlight.fields(['message.analysisone', 'message.analysistwo'], 'message');
highlight.type('unified', 'message'); // <--- wont wont with typescript types, nor will it work at run time if type checks are ignored.

const requestBody = esb.requestBodySearch()
  .highlight()
  .query(esb.matchQuery('message', 'this is a test'));

Proposed Solution

Add 'unified' as a string constant supported in the highlight.type() function.

As a proof of concept we tried patching this in a local development env, and it seemed to work as expected. see #206 for details.

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

1 participant