quickwit
quickwit copied to clipboard
Add support for snippetting.
Tantivy offers a way to return a sample of the documents that contains some passage containiing the matched keywords.
It would be nice to add this feature to quickwit's API.
I would go with :
- Rest:
https://quickwit-host/api/v1/hdfs/search?query=body:foo&snippet_fields=body
- Cli: .quickwit index search --query "body:foo" --snippet_field body
The following checks need to happen during search:
- Does snippet_field appear in the query or part of the default search fields?
- Is snippet_field of field type that supports snippeting (text, indexed ..) ?
- Serialise the snippet