You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucy.apache.org by "Miller, Benjamin" <mi...@janelia.hhmi.org> on 2013/04/16 22:36:34 UTC

[lucy-user] PrefixQuery

I am having some issues implementing a PrefixQuery.

I used the source https://github.com/apache/lucy/blob/master/perl/sample/PrefixQuery.pm as a template but have had multiple issues.  First, this package references Tally (doesn't exist).  I removed Tally and then i can't sort by score.  It also does not handle multiple fields.  

Is there a simple and clean way to do term  prefix matching?

My question on stack overflow:
http://stackoverflow.com/questions/16045948/how-to-do-a-prefix-query-in-apache-lucy-with-perl

Ben

Re: [lucy-user] PrefixQuery

Posted by "Miller, Benjamin" <mi...@janelia.hhmi.org>.
Great info, thanks!

On Apr 17, 2013, at 3:42 PM, Peter Karman <pe...@peknet.com> wrote:

> On 4/17/13 8:21 AM, Miller, Benjamin wrote:
>> After some more digging I was able to find a solution.
>> 
>> http://lucy.apache.org/docs/perl/Lucy/Docs/Cookbook/CustomQuery.html
>> 
> 
> You may want to look at LucyX::Search::Wildcard::Query on CPAN which already implements this.
> 
> Also, if you use Search::Query::Dialect::Lucy to parse your queries, you get wildcard parsing automatically.
> 
> 
> -- 
> Peter Karman  .  http://peknet.com/  .  peter@peknet.com


Re: [lucy-user] PrefixQuery

Posted by Peter Karman <pe...@peknet.com>.
On 4/17/13 8:21 AM, Miller, Benjamin wrote:
> After some more digging I was able to find a solution.
>
> http://lucy.apache.org/docs/perl/Lucy/Docs/Cookbook/CustomQuery.html
>

You may want to look at LucyX::Search::Wildcard::Query on CPAN which 
already implements this.

Also, if you use Search::Query::Dialect::Lucy to parse your queries, you 
get wildcard parsing automatically.


-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com

Re: [lucy-user] PrefixQuery

Posted by "Miller, Benjamin" <mi...@janelia.hhmi.org>.
After some more digging I was able to find a solution.

http://lucy.apache.org/docs/perl/Lucy/Docs/Cookbook/CustomQuery.html


On Apr 16, 2013, at 4:36 PM, "Miller, Benjamin" <mi...@janelia.hhmi.org>
 wrote:

> I am having some issues implementing a PrefixQuery.
> 
> I used the source https://github.com/apache/lucy/blob/master/perl/sample/PrefixQuery.pm as a template but have had multiple issues.  First, this package references Tally (doesn't exist).  I removed Tally and then i can't sort by score.  It also does not handle multiple fields.  
> 
> Is there a simple and clean way to do term  prefix matching?
> 
> My question on stack overflow:
> http://stackoverflow.com/questions/16045948/how-to-do-a-prefix-query-in-apache-lucy-with-perl
> 
> Ben