[lucy-user] PrefixQuery

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[lucy-user] PrefixQuery

Miller, Benjamin
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
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] PrefixQuery

Miller, Benjamin
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" <[hidden email]>
 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

Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] PrefixQuery

Peter Karman
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/  .  [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] PrefixQuery

Miller, Benjamin
Great info, thanks!

On Apr 17, 2013, at 3:42 PM, Peter Karman <[hidden email]> 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/  .  [hidden email]