[Xapian-discuss] Get term from document by position
James Aylett
james-xapian at tartarus.org
Sun Jul 26 13:55:56 BST 2015
On 23 Jul 2015, at 13:30, john.alveris at Safe-mail.net wrote:
> Hello. Is there any FAST way to get a term from the xapian document by it's position, something like
> std::string term = Xapian::Document::GetTermByPosition(int position) ?
Not that I’m aware of. Snippet highlighting is something that was worked on for a GSoC project a few years ago, and is mentioned in our FAQ: <http://trac.xapian.org/wiki/FAQ/Snippets>. It’s not available in the 1.2 series, but as I understand it should work out of the box in 1.3.3.
Note that your suggested approach of going from terms to snippet doesn’t work in the general case, because of issues like stemming. Instead, Mihai’s approach was to use the matcher information to generate a snippet from the original, unstemmed and untermed, text.
J
--
James Aylett, occasional trouble-maker
xapian.org
More information about the Xapian-discuss
mailing list