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 Abhinav Tiwari <ab...@gmail.com> on 2016/06/10 08:18:25 UTC

Caching lucene index

Hi Team,

We have recently implemented a search feature in our web application using
Lucene where we perform dynamic indexing. We are looking for opportunities
of caching the index so that we do not have to perform dynamic indexing
again for the same query and query can be searched using the cached index
to save latency. To explain more in detail, we have implemented a search
where we index data dynamically for each request of search for a particular
Id. Once a request comes up, we fetch the details for the request and index
it. Now, we do not want to do the same thing for all the requests of the
same Id until a new request comes up for a new Id. That is why we are
looking for a way to cache index generated for each Id for  some time.
Could you please provide suggestions around how can we cache such index?


Thanks,
Abhinav

Re: Caching lucene index

Posted by Adrien Grand <jp...@gmail.com>.
We do not have anything that is designed to address this use-case, except
maybe MemoryIndex if your use-case involves indexing a single document. I
don't really have suggestions except making sure that the number of indices
that you maintain at any point in time is bounded. Lucene indices typically
some overhead which is usually negligible once amortized across many
documents. But if your use-case is more about having tons of small indices,
then it might become an issue (I'm thinking about memory usage and file
handles in particular). You might also want to check whether Lucene is the
rigtht tool for your problem.

Le mar. 12 juil. 2016 à 17:56, Abhinav Tiwari <ab...@gmail.com>
a écrit :

> Any help here?
>
> ---------- Forwarded message ----------
> From: Abhinav Tiwari <ab...@gmail.com>
> Date: Fri, Jun 10, 2016 at 1:48 PM
> Subject: Caching lucene index
> To: java-user@lucene.apache.org
>
>
> Hi Team,
>
> We have recently implemented a search feature in our web application using
> Lucene where we perform dynamic indexing. We are looking for opportunities
> of caching the index so that we do not have to perform dynamic indexing
> again for the same query and query can be searched using the cached index
> to save latency. To explain more in detail, we have implemented a search
> where we index data dynamically for each request of search for a particular
> Id. Once a request comes up, we fetch the details for the request and index
> it. Now, we do not want to do the same thing for all the requests of the
> same Id until a new request comes up for a new Id. That is why we are
> looking for a way to cache index generated for each Id for  some time.
> Could you please provide suggestions around how can we cache such index?
>
>
> Thanks,
> Abhinav
>

Fwd: Caching lucene index

Posted by Abhinav Tiwari <ab...@gmail.com>.
Any help here?

---------- Forwarded message ----------
From: Abhinav Tiwari <ab...@gmail.com>
Date: Fri, Jun 10, 2016 at 1:48 PM
Subject: Caching lucene index
To: java-user@lucene.apache.org


Hi Team,

We have recently implemented a search feature in our web application using
Lucene where we perform dynamic indexing. We are looking for opportunities
of caching the index so that we do not have to perform dynamic indexing
again for the same query and query can be searched using the cached index
to save latency. To explain more in detail, we have implemented a search
where we index data dynamically for each request of search for a particular
Id. Once a request comes up, we fetch the details for the request and index
it. Now, we do not want to do the same thing for all the requests of the
same Id until a new request comes up for a new Id. That is why we are
looking for a way to cache index generated for each Id for  some time.
Could you please provide suggestions around how can we cache such index?


Thanks,
Abhinav