You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Raul Raja Martinez <do...@estudiowebs.com> on 2005/12/10 13:49:02 UTC

where to store the index

What would be the best practice storing the index in a webapp.
I mean in wich folder?

Thanks.

Raul.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: where to store the index

Posted by Dan Funk <da...@danandtamara.com>.
I can't think of a good reason for you to keep the index in memory - The
performance increase (from blazing-fast to super-blazing-fast) just isn't
something your users are going to notice.  And it's at the cost of building
the index from scratch every time you start up.

Eventually, for one reason or another, you will end up having the lucene
index outside the web-app directory - i think your best bet would be to go
ahead and start out that way.

On 12/10/05, Raul Raja Martinez <do...@estudiowebs.com> wrote:
>
> first thanks for your response Dan,
>
> It I'll be around 5.000 database records with three indexed fields:
> id, title(1 line) and description(around three lines). I was even
> considering using the in memory feature for faster access but I'm new to
> lucene and I'don't know if that I'll cause my problems in the future.
>
> Any help appreciated
>
> best regards.
>
> Raul.
>
> Dan Funk wrote:
> > If this is a small index and it won't change after install (you are just
> > using it to search, not to index), place it in a sub-directory of
> WEB-INF.
> >
> > If it is a larger index (something you don't want to copy frequently),
> or it
> > will change after install, then you shouldn't keep it inside your web
> > application at all, rather you should specify an external directory
> outside
> > the web application using some sort of configuration setting, maybe
> specify
> > it in your web.xml file.
> >
> > On 12/10/05, Raul Raja Martinez <do...@estudiowebs.com> wrote:
> >> What would be the best practice storing the index in a webapp.
> >> I mean in wich folder?
> >>
> >> Thanks.
> >>
> >> Raul.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: where to store the index

Posted by Raul Raja Martinez <do...@estudiowebs.com>.
first thanks for your response Dan,

It I'll be around 5.000 database records with three indexed fields:
id, title(1 line) and description(around three lines). I was even 
considering using the in memory feature for faster access but I'm new to 
lucene and I'don't know if that I'll cause my problems in the future.

Any help appreciated

best regards.

Raul.

Dan Funk wrote:
> If this is a small index and it won't change after install (you are just
> using it to search, not to index), place it in a sub-directory of WEB-INF.
> 
> If it is a larger index (something you don't want to copy frequently), or it
> will change after install, then you shouldn't keep it inside your web
> application at all, rather you should specify an external directory outside
> the web application using some sort of configuration setting, maybe specify
> it in your web.xml file.
> 
> On 12/10/05, Raul Raja Martinez <do...@estudiowebs.com> wrote:
>> What would be the best practice storing the index in a webapp.
>> I mean in wich folder?
>>
>> Thanks.
>>
>> Raul.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: where to store the index

Posted by Dan Funk <da...@gmail.com>.
If this is a small index and it won't change after install (you are just
using it to search, not to index), place it in a sub-directory of WEB-INF.

If it is a larger index (something you don't want to copy frequently), or it
will change after install, then you shouldn't keep it inside your web
application at all, rather you should specify an external directory outside
the web application using some sort of configuration setting, maybe specify
it in your web.xml file.

On 12/10/05, Raul Raja Martinez <do...@estudiowebs.com> wrote:
>
> What would be the best practice storing the index in a webapp.
> I mean in wich folder?
>
> Thanks.
>
> Raul.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>