lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Cache Lucene based index.
Date Sun, 22 May 2016 16:32:16 GMT
I've really got to echo Michael's comment. This really feels like
an XY problem, you're asking how to do X because you think
it'll solve Y without really explaining what Y is.

If this is some kind of _temporary_ index where you want to index
a few docs and, for some reason do _not_ want the data to be
persisted then RAMDirectory is probably what you want to use.
MemoryIndex is (generally) more suitable for single documents.

Neither of those is going to give you significant improvements
over just indexing to a "regular" Lucene index which uses
MMapDirectory as the blog Michael pointed you to explains.

Best,
Erick

On Sun, May 22, 2016 at 7:03 AM, Ahmet Arslan <iorixxx@yahoo.com.invalid> wrote:
> Hi Singhal,
>
> May be MemoryIndex or RAMDirectory?
>
> Ahmet
>
>
>
> On Saturday, May 21, 2016 1:42 PM, Prateek Singhal <prateek.brly@gmail.com> wrote:
> You can consider that I want to store the lucene index in some sort of
> temporary memory or a HashMap so that I do not need to index the documents
> every time as it is a costly operation. I can directly return the lucene
> index from that HashMap and use it to answer my queries.
>
> Just want to know if I can access the lucene index object which lucene has
> created so that I can cache it.
>
>
>
> On Sat, May 21, 2016 at 3:46 PM, Uwe Schindler <uwe@thetaphi.de> wrote:
>
>> Hi,
>>
>> What do you mean with "cache"?
>>
>> Uwe
>>
>> -----
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: uwe@thetaphi.de
>> > -----Original Message-----
>> > From: Prateek Singhal [mailto:prateek.brly@gmail.com]
>> > Sent: Saturday, May 21, 2016 11:27 AM
>> > To: java-user@lucene.apache.org
>> > Subject: Cache Lucene based index.
>> >
>> > Hi Lucene lovers,
>> >
>> > I have a use-case where I want to *create a lucene based index* of
>> multiple
>> > documents and then *want to cache that index*.
>> >
>> > Can anyone suggest if this is possible ?
>> > And which *type of cache* will be most efficient for this use case.
>> >
>> > Also if you can provide me with any *example *of the same then it will be
>> > really very helpful.
>> >
>> > Thanks.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
>
> --
> Regards,
>
> Prateek Singhal
> Software Development Engineer @ Amazon.com
>
> "Believe in yourself and you can do unbelievable things."
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message