'highlight search query full result in whoosh
I have a query
t1 = query.Term("content", "field")
t2 = query.Term("content", "information")
t3 = query.Term("content", "document")
q = spans.SpanNear2([t1, t2, t3], slop=5, ordered=True)
finds and marks individual words.
[information] A [field] is a piece [document] create [document] of [information] for each [document] in the index,...
but I need to mark whole correct expression. (?)
information A [field is a piece document create document of information for each document] in the index,...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
