[Xapian-discuss] Query / Database question
Olly Betts
olly at survex.com
Wed Feb 21 10:55:26 GMT 2007
On Wed, Feb 21, 2007 at 10:33:10AM +0000, Ross Lawley wrote:
> i.e. Categories might be: car, bike and bicycle.
>
> The user may want to search:
>
> "bmw london" and select the car category
> or
> "nottingham" and select all categories
>
> Is that something that is easy to implement through the Xapian query
> interface?
Yes, see docs/termprefixes.txt in the Omega documentation for details.
Essentially, if the scriptindex input file has a field called "category"
your index script would have:
category : lowercase boolean=XCAT
Then if you're using Omega, you can pass a "B=XCATcar" as a parameter,
which you can allow the user to specify in an HTML form with a
"<select>" or radio buttons or whatever.
You can also set up the QueryParser to allow "category:car" in the query
string.
Cheers,
Olly
More information about the Xapian-discuss
mailing list