Retrieve the complete document after search

Hi, with appsearch the result field has the limit of 1000 characters. But there is a way to open the complete document after that? Can I open then the whole document with seach-ui?

thanks

Results have "raw" and "snippet" values. You should be able to get the complete field values from the "raw" field: Search API result fields | Elastic App Search Documentation [7.15] | Elastic

Thanks a lot :wink:

@JasonStoltz ok, I could retrieve the raw, but if the document indexed has more than 1000 characters I couldn't read it completely as the limit for raw is also 1000 characters as the snippet.

Ah, I didn't realize that. I apologize for the misinformation :grimacing:

That appears to be a hard limit as well. You could probably fetch the entire document with the Documents API: Documents API | Elastic App Search Documentation [7.15] | Elastic.

Just be aware that that API is only accessible with a "private" API key which you would not want to expose in plain text.

Thanks Jason. So the way to see the complete document after search (document of more than a thousand characters) would be through a backend that handles that private key in a way that is not exposed?

I think so, yes.

You could also consider breaking that field up into multiple different fields before indexing and concatenate them back together when rendering results?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.