You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucy.apache.org by Anil Pachuri <an...@yahoo.com> on 2012/11/08 16:48:43 UTC

[lucy-user] facet function

Hi,

How do I implement facets in Lucy search server? I have been able to successfully execute the given code for 'sample' example webserver. I tried to implement a simple facet function but it takes an unreasonably long time to execute when the list of terms is little long. This is because I read the list file in each process request/iteration. Keeping the list in the memory may be an option but I was wondering if facet function is already implemented in Lucy. Any sample code for facet implementation?

One other question I have is about 'CGI' module that 'sample' code uses. I read somewhere that 'CGI' module loads everytime separately for each webserver request, which may cause delay in loading the output webpage if there are multiple requests. Is there a way to make this module persistent, or any other better way to do this.

Please advise. Sorry for asking too many questions, just trying to learn the preliminaries.
Thanks,

Anil

Re: [lucy-user] facet function

Posted by Lee <le...@gmail.com>.
On 08/11/2012 16:48, Anil Pachuri wrote:
> ...
> One other question I have is about 'CGI' module that 'sample' code uses. I read somewhere that 'CGI' module loads everytime separately for each webserver request, which may cause delay in loading the output webpage if there are multiple requests. Is there a way to make this module persistent, or any other better way to do this.
You could look into mod_perl - I believe there are ppm files for Win32 - 
though it can be a bit of a steep learning curve.

You could also try looking into Fast CGI.

I'd only bother if it becomes an issue - use CGI() is not a heavy load.

HTH
Lee

RE: [lucy-user] facet function

Posted by "Zebrowski, Zak" <za...@mitre.org>.
Hi,

I have not run into faucets before.

<snip>
One other question I have is about 'CGI' module that 'sample' code uses. I read somewhere that 'CGI' module loads everytime separately for each webserver request, which may cause delay in loading the output webpage if there are multiple requests. Is there a way to make this module persistent, or any other better way to do this.
</snip>

If you're using the perl implementation, there literally is a whole book on perl performance.  Google "pratical mod_perl oriley", for a book on that.  There is also a "lite cgi" module...  While this is a concern if you're website is going to be hit a lot, if you have a smaller website, or if you are still in dev stages, this really is secondary to your overall question.

Zak

Re: [lucy-user] facet function

Posted by Peter Karman <pe...@peknet.com>.
On 11/8/12 9:48 AM, Anil Pachuri wrote:
> Hi,
>
> How do I implement facets in Lucy search server? I have been able to
> successfully execute the given code for 'sample' example webserver. I
> tried to implement a simple facet function but it takes an
> unreasonably long time to execute when the list of terms is little
> long. This is because I read the list file in each process
> request/iteration. Keeping the list in the memory may be an option
> but I was wondering if facet function is already implemented in Lucy.
> Any sample code for facet implementation?
>

Dezi (http://dezi.org) implements faceted search on top of Lucy. It does 
it with https://metacpan.org/module/Search::OpenSearch::Engine::Lucy

There is no built-in facet function as part of Lucy.



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