[Xapian-discuss] Prefix lowercasing

Matthew Somerville matthew at mysociety.org
Sat Feb 16 20:07:59 GMT 2008


Olly Betts wrote:
> That's simply incorrect at the moment - a boolean prefixed term isn't
> forced to lowercase.  I'll fix it.

Thanks for confirming. I just have a simple:

     preg_replace('#(department|party):.+?\b#ie', 'strtolower("$0")'

to sort it, working well (apart from the horrible PHP) :-)

> There should be a way to allow boolean terms to be manipulated though.

Yes, that would be useful - I currently have the terms M1 to M8 in our 
database, with the QueryParser prefix 'major', but I currently manually 
convert e.g. 'section:debates' to 'major:1' or 'section:sp' to 'major:7' - 
and also 'location:scotland' to 'major:7 major:8' :-)

ATB,
Matthew



More information about the Xapian-discuss mailing list