My apologies in advance as I'm new to ES. This is kind of a strange use-case, but we have a large text field that we would like to do 2 things with:
- Show the first X chars of the body text with any search results highlighted
- Show the first Y highlights/fragments of the body text with search results highlighted
My goal is to do this all in one search, but I can't find a way to get the same field back with different highlighting parameters. I was thinking maybe if I had some way to create an alias on the field then I could refer to it in the highlights section but I couldn't find a way to do that either.
We can simply store the first X chars of the document as a separate field to work around the issue, but the developer handing ingestion would prefer to avoid that.
Any thoughts would be much appreciated.