[KinoSearch] Using QueryFilter and TermQuery
Marvin Humphrey
marvin at rectangular.com
Tue Jul 22 19:49:23 PDT 2008
On Jul 21, 2008, at 8:03 AM, Riyaad Miller wrote:
> However when doing so for a string of words (eg. $Source = "foo foo
> foo blah blah") it returns no results at all.
> NB. 'site' has been indexed correctly. Could any please assist
> regarding this?
The problem is that TermQuery's constructor applies raw text. It
doesn't parse.
> my $SiteOnly = KinoSearch::Search::TermQuery->new( term =>
> KinoSearch::Index::Term->new( 'site', $Source ) );
Try using field-specific QueryParsers. In 0.162...
my $site_only_parser = KinoSearch::QueryParser::QueryParser->new(
analyzer => $analyzer,
fields => ['site'],
);
my $site_only = $site_only_parser->parse($site_qstring);
...
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