I see in the xml output from omega the following: <terms> <term term="Ztest" show="tests"/> <term term="Zwant" show="wanted"/> </terms> For each hit. I know I can get the "terms" from the Enquire object via get_matching_terms_begin and get_matching_terms_end but where do the unstemmed values shown in the "show" keyword above come from? Thanks, Jim.
James Aylett
2009-Jan-06 21:45 UTC
[Xapian-discuss] Question about how Omega gets its data
On Tue, Jan 06, 2009 at 04:26:57PM -0500, Jim wrote:> I see in the xml output from omega the following: > > <terms> > <term term="Ztest" show="tests"/> > <term term="Zwant" show="wanted"/> > </terms> > > For each hit. I know I can get the "terms" from the Enquire object via > get_matching_terms_begin and get_matching_terms_end but where do the > unstemmed values shown in the "show" keyword above come from?It uses a method on the QueryParser, unstem_begin(), which gives a TermIterator over unstemmed terms *in the query* of the stemmed term supplied. See <http://xapian.org/docs/apidoc/html/classXapian_1_1QueryParser.html#bed4668a2ed42741c3c0cfc7eb7db2d8>, and the ``pretty_term()`` method in Omega's query.cc . J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james at tartarus.org uncertaintydivision.org