[Xapian-discuss] Question about how Omega gets its data

James Aylett james-xapian at tartarus.org
Tue Jan 6 21:45:06 GMT 2009


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



More information about the Xapian-discuss mailing list