lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksandar Radovanovic <Aleksan...@Radovanovic.com>
Subject [lucy-user] Re: LucyX::Search::NullTermQuery 0.003
Date Mon, 01 Jul 2013 11:38:13 GMT
Great work Peter! Thank you!

And, ... :-) just wondering, is there a way one ca use NullTermQuery / 
AnyTermQuery to return all records for an empty query string? Also, is 
there a way to query multiple fields?

Alex

On 6/26/13 5:40 AM, Peter Karman wrote:
> LucyX::Search::NullTermQuery 0.003 is now on CPAN.
>
> This Lucy query extension supports looking for empty and not empty fields,
> similar to a NULL SQL query.
>
> Example:
>
>   foo:NULL
>   foo!:NULL   # or NOT foo:NULL
>
> syntax above supported by Search::Query::Dialect::Lucy 0.10, also now on CPAN.
>
> my $parser = Search::Query->parser(
>      dialect   => 'Lucy',
>      null_term => 'NULL',
> );
> my $query = $parser->parse('foo:NULL');
> my $hits = $lucy_searcher->hits( query => $query->as_lucy_query() );
>
>
>


Mime
View raw message