[Xapian-discuss] searching categories

James Aylett james-xapian at tartarus.org
Mon Apr 27 11:11:26 BST 2009

On Mon, Apr 27, 2009 at 10:08:38AM +0200, james cauwelier wrote:

> I am trying to index categories and to search within them.  I index the
> category text with prefix XCATEGORY and when I search for 'twilight box' I
> get following results.  The end of each line shows the indexed category, eg.
> 'Engelse boeken' for the first result.  Adding '+category:engelse' or
> '+category:boeken' to the search query does not give any results.

You are adding (eg) "XCATEGORYEngelse boeken" as a term. However the
way the query parser expects this to be added, is for you to use
TermGenerator or similar to index the text "Engelse boeken" with a
prefix of "XCATEGORY". If you do this, you'll end up with two terms,
"XCATEGORYEngels" and another one for boeken (depending on what that
stems to). Then searching with the prefix should work as you desire.


  James Aylett

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

More information about the Xapian-discuss mailing list