[Xapian-discuss] Simulating Fields

James Aylett james-xapian at tartarus.org
Sat May 2 23:32:53 BST 2009


On Sat, May 02, 2009 at 05:19:56PM -0400, Luis Alberto Zarrabeitia Gomez wrote:

> delve shows the title terms indexed with the XTITLE prefix, but, how
> do I write a query to search for those? How can I write a query to
> retrieve a document given the title (but not those with similar
> titles)?

You can use the QueryParser for this; set a term prefix before parsing
the query, for instance. Not that if you're matching on exact titles,
you probably want a phrase search (or, if you're not doing anything
else, possibly to construct the term as XTITLE<title> and match it as
a single (boolean) term, without using the QueryParser at all).

J

-- 
  James Aylett

  talktorex.co.uk - xapian.org - uncertaintydivision.org



More information about the Xapian-discuss mailing list