[Xapian-discuss] [Xapian-devel] How to filter search result with query with has white space.

Olly Betts olly at survex.com
Sun Sep 22 08:09:05 BST 2013


On Sun, Sep 22, 2013 at 12:04:55PM +0530, Naveen A.N. wrote:
> I tried the query
> 
> xapian title:"Xapian is good"
> 
> It was not working.
> 
> The description is   "Xapian::Query(((Ztitlexapian:(pos=1) OR
> Zcontentxapian:(pos=1)) FILTER title:Xapian is good))"

Note that the last term here is: title:Xapian is good

> And this is what i have when i use "delve -r 1 -d xapian/"
> 
> Data for record #1:
[...]
> contentxapian titleXapain is good titlegood titleis titlexapain urlhttp

Here you have the term: titleXapain is good

Your first problem is that "Xapian" is misspelled as "Xapain" here,
but not above.

Your second problem is that there's no colon in this term, but there is
above.  It looks like you've told QueryParser to use the prefix "title:"
but TermGenerator to use the prefix "title".  You need to be consistent
about this (and I'd recommend a colon or some other separator, as
otherwise it can be ambiguous where the prefix ends and the term begins,
especially with a lower-case prefix like you're using).

Cheers,
    Olly



More information about the Xapian-discuss mailing list