Get files contents from search
AnsweredOn the box.com site, when a user searches a phrase/word, in the results below the file name shows some file contents that match the search term. Is there a way to replicate this using the box api?
-
Hi ,
There's not an exact way to have relevant matched content returned by the /search API. The closest behavior you could get would be to return the extracted text representation of any search results:
https://developer.box.com/en/guides/representations/text/
And then deciding how you'd want to display surrounding text, e.g. X letters before and after or using more advanced relevance logic.
Always feel free to add suggestions to https://pulse.box.com/! It'll help us the most if you can provide context around your use case so we can understand how new features would impact customers.
Thanks,
Jason
Please sign in to leave a comment.
Comments
1 comment