Closed andreasbaumann closed 7 years ago
Is this a possible in the forward index? Can I configur this in the analyzer (the position assignment policy)?
An alternative representation of the problem is:
word marker word
We can replace the sequence of tokens with the meta feature marker
and encode
the length of the span in tokens into the feature value, so we have a chance to
highlight the span. The search index would assume we only search for the meta feature
(and we recognize it somehow in the query), we cannot search for the meta feature
AND in parallel for tokens withing te meta feature.
I do not see the point of having structures built in the forward index. Structures as spans are defined by elements in the search index or as length attribute of features. The forward index is just there to pick elements. It would be far to inefficient to model structures in the forward index.
having spans of meta features with a start and an end (sequence of tokens) it would be nice if the forward index can store:
Now the problem is the token positions, because some tokens (
begin_marker
,end_marker
should have the same position as the first and the last word of the span.