[KinoSearch] search for text regardless of field
Peter Karman
peter at peknet.com
Tue Jan 5 21:19:07 PST 2010
Marvin Humphrey wrote on 1/5/10 10:56 PM:
> Try this:
>
> use Data::Dumper qw( Dump );
> my $qparser = KinoSearch::QueryParser->new(
> schema => $searcher->get_schema,
> );
> $qparser->set_heed_colons(1); # also try with this commented out.
> my $foobar_query = $qparser->parse("foobar");
> my $title_foobar_query = $qparser->parse("title:foobar");
> Dump($foobar_query->dump);
> Dump($title_foobar_query->dump);
>
> I'll bet those queries aren't the same.
>
you're right. without the field it is an ORQuery with a list of child TermQuery
objects. With the field it is a single TermQuery. Which totally makes sense.
thanks.
--
Peter Karman . http://peknet.com/ . peter at peknet.com
More information about the kinosearch
mailing list