[KinoSearch] Boolean searching across multiple fields

Marvin Humphrey marvin at rectangular.com
Wed Oct 11 15:29:04 PDT 2006




On Oct 11, 2006, at 3:04 PM, Chris Nandor wrote:

> OK, so I have these fields:
>
> 	title
> 	introtext
>
> Both are keyword-searched against.  If I search "+foo +bar" though,  
> then
> how can I get results that will find foo in one, and bar in another?

The QueryParser in KinoSearch 0.13 has this behavior by default.

Note the top hit in this search for '+3 +senator':

http://www.rectangular.com/cgi-bin/uscon_search.cgi?q=%2B3+%2Bsenator

The title contains '3', but the body does not.  The body contains  
'senator', but the title does not.

> I know in the next version I can do, simply:
>
>  	my $query_parser = KinoSearch::QueryParser::QueryParser->new(
>  		analyzer	=> $analyzer,
>  		fields		=> \@fields,
>  	);

What version are you using?  If you're using 0.12, you can get 0.13  
either from the KS homepage or off the search.cpan.org website.  You  
can also do this from the CPAN shell:

     install CREAMYG/KinoSearch-0.13.tar.gz

Ordinarily, you could just 'install KinoSearch', but the CPAN indexer  
was hosed when I uploaded that file and it's never recovered.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/



_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch




More information about the kinosearch mailing list