You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Thomas Nguyen <th...@ign.com> on 2009/11/12 02:46:11 UTC

Configuring Solr to use RAMDirectory

Is it possible to configure Solr to fully load indexes in memory?  I
wasn't able to find any documentation about this on either their site or
in the Solr 1.4 Enterprise Search Server book.


Re: Configuring Solr to use RAMDirectory

Posted by Raghuveer Kancherla <ra...@aplopio.com>.
Hi Dipti,
Just out of curiosity, are you trying to use RAMDirectory for improvement in
speed? I tried doing that and did not see any significant improvement. Would
be nice to know what your experiment shows.

- Raghu


On Thu, Dec 31, 2009 at 4:17 PM, Erik Hatcher <er...@gmail.com>wrote:

> It's possible, but requires a custom DirectoryFactory implementation.
>  There isn't a built in factory to construct a RAMDirectory.  You wire it
> into solrconfig.xml this way:
>
>  <directoryFactory name="DirectoryFactory"
> class="[fully.qualified.classname]">
>    <!-- Parameters as required by the implementation -->
>  </directoryFactory>
>
>
>
> On Dec 31, 2009, at 5:06 AM, dipti khullar wrote:
>
>  Hi
>>
>> Can somebody let me know if its possible to configure RAMDirectory from
>> solrconfig.xml. Although its clearly mentioned in
>> https://issues.apache.org/jira/browse/SOLR-465 by Mark that he has worked
>> upon it, but still I couldn't find any such property in config file in
>> Solr
>> 1.4 latest download.
>> May be I am overlooking some simple property. Any help would be
>> appreciated.
>>
>>
>> Thanks
>> Dipti
>>
>> On Fri, Nov 20, 2009 at 2:27 PM, Andrey Klochkov <
>> aklochkov@griddynamics.com
>>
>>> wrote:
>>>
>>
>>  I thought that SOLR-465 just does what is asked, i.e. one can use any
>>> Directory implementation including RAMDirectory. Thomas, take a look at
>>> it.
>>>
>>> On Thu, Nov 12, 2009 at 7:55 AM, Otis Gospodnetic <
>>> otis_gospodnetic@yahoo.com> wrote:
>>>
>>>  I think not out of the box, but look at SOLR-243 issue in JIRA.
>>>>
>>>> You could also put your index on ram disk (tmpfs), but it would be
>>>>
>>> useless
>>>
>>>> for writing to it.
>>>>
>>>> Note that when people ask about loading the whole index in memory
>>>> explicitly, it's often a premature optimization attempt.
>>>>
>>>> Otis
>>>> --
>>>> Sematext is hiring -- http://sematext.com/about/jobs.html?mls
>>>> Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR
>>>>
>>>>
>>>>
>>>> ----- Original Message ----
>>>>
>>>>> From: Thomas Nguyen <th...@ign.com>
>>>>> To: solr-user@lucene.apache.org
>>>>> Sent: Wed, November 11, 2009 8:46:11 PM
>>>>> Subject: Configuring Solr to use RAMDirectory
>>>>>
>>>>> Is it possible to configure Solr to fully load indexes in memory?  I
>>>>> wasn't able to find any documentation about this on either their site
>>>>>
>>>> or
>>>
>>>> in the Solr 1.4 Enterprise Search Server book.
>>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Andrew Klochkov
>>> Senior Software Engineer,
>>> Grid Dynamics
>>>
>>>
>

Re: Configuring Solr to use RAMDirectory

Posted by Erik Hatcher <er...@gmail.com>.
It's possible, but requires a custom DirectoryFactory implementation.   
There isn't a built in factory to construct a RAMDirectory.  You wire  
it into solrconfig.xml this way:

   <directoryFactory name="DirectoryFactory"  
class="[fully.qualified.classname]">
     <!-- Parameters as required by the implementation -->
   </directoryFactory>


On Dec 31, 2009, at 5:06 AM, dipti khullar wrote:

> Hi
>
> Can somebody let me know if its possible to configure RAMDirectory  
> from
> solrconfig.xml. Although its clearly mentioned in
> https://issues.apache.org/jira/browse/SOLR-465 by Mark that he has  
> worked
> upon it, but still I couldn't find any such property in config file  
> in Solr
> 1.4 latest download.
> May be I am overlooking some simple property. Any help would be  
> appreciated.
>
>
> Thanks
> Dipti
>
> On Fri, Nov 20, 2009 at 2:27 PM, Andrey Klochkov <aklochkov@griddynamics.com
>> wrote:
>
>> I thought that SOLR-465 just does what is asked, i.e. one can use any
>> Directory implementation including RAMDirectory. Thomas, take a  
>> look at it.
>>
>> On Thu, Nov 12, 2009 at 7:55 AM, Otis Gospodnetic <
>> otis_gospodnetic@yahoo.com> wrote:
>>
>>> I think not out of the box, but look at SOLR-243 issue in JIRA.
>>>
>>> You could also put your index on ram disk (tmpfs), but it would be
>> useless
>>> for writing to it.
>>>
>>> Note that when people ask about loading the whole index in memory
>>> explicitly, it's often a premature optimization attempt.
>>>
>>> Otis
>>> --
>>> Sematext is hiring -- http://sematext.com/about/jobs.html?mls
>>> Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR
>>>
>>>
>>>
>>> ----- Original Message ----
>>>> From: Thomas Nguyen <th...@ign.com>
>>>> To: solr-user@lucene.apache.org
>>>> Sent: Wed, November 11, 2009 8:46:11 PM
>>>> Subject: Configuring Solr to use RAMDirectory
>>>>
>>>> Is it possible to configure Solr to fully load indexes in  
>>>> memory?  I
>>>> wasn't able to find any documentation about this on either their  
>>>> site
>> or
>>>> in the Solr 1.4 Enterprise Search Server book.
>>>
>>>
>>
>>
>> --
>> Andrew Klochkov
>> Senior Software Engineer,
>> Grid Dynamics
>>


Re: Configuring Solr to use RAMDirectory

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Dec 31, 2009 at 3:36 PM, dipti khullar <di...@gmail.com>wrote:

> Hi
>
> Can somebody let me know if its possible to configure RAMDirectory from
> solrconfig.xml. Although its clearly mentioned in
> https://issues.apache.org/jira/browse/SOLR-465 by Mark that he has worked
> upon it, but still I couldn't find any such property in config file in Solr
> 1.4 latest download.
> May be I am overlooking some simple property. Any help would be
> appreciated.
>
>
Note that there are things like replication which will not work if you are
using a RAMDirectory.

-- 
Regards,
Shalin Shekhar Mangar.

Re: Configuring Solr to use RAMDirectory

Posted by dipti khullar <di...@gmail.com>.
Hi

Can somebody let me know if its possible to configure RAMDirectory from
solrconfig.xml. Although its clearly mentioned in
https://issues.apache.org/jira/browse/SOLR-465 by Mark that he has worked
upon it, but still I couldn't find any such property in config file in Solr
1.4 latest download.
May be I am overlooking some simple property. Any help would be appreciated.


Thanks
Dipti

On Fri, Nov 20, 2009 at 2:27 PM, Andrey Klochkov <aklochkov@griddynamics.com
> wrote:

> I thought that SOLR-465 just does what is asked, i.e. one can use any
> Directory implementation including RAMDirectory. Thomas, take a look at it.
>
> On Thu, Nov 12, 2009 at 7:55 AM, Otis Gospodnetic <
> otis_gospodnetic@yahoo.com> wrote:
>
> > I think not out of the box, but look at SOLR-243 issue in JIRA.
> >
> > You could also put your index on ram disk (tmpfs), but it would be
> useless
> > for writing to it.
> >
> > Note that when people ask about loading the whole index in memory
> > explicitly, it's often a premature optimization attempt.
> >
> > Otis
> > --
> > Sematext is hiring -- http://sematext.com/about/jobs.html?mls
> > Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR
> >
> >
> >
> > ----- Original Message ----
> > > From: Thomas Nguyen <th...@ign.com>
> > > To: solr-user@lucene.apache.org
> > > Sent: Wed, November 11, 2009 8:46:11 PM
> > > Subject: Configuring Solr to use RAMDirectory
> > >
> > > Is it possible to configure Solr to fully load indexes in memory?  I
> > > wasn't able to find any documentation about this on either their site
> or
> > > in the Solr 1.4 Enterprise Search Server book.
> >
> >
>
>
> --
> Andrew Klochkov
> Senior Software Engineer,
> Grid Dynamics
>

Re: Configuring Solr to use RAMDirectory

Posted by Andrey Klochkov <ak...@griddynamics.com>.
I thought that SOLR-465 just does what is asked, i.e. one can use any
Directory implementation including RAMDirectory. Thomas, take a look at it.

On Thu, Nov 12, 2009 at 7:55 AM, Otis Gospodnetic <
otis_gospodnetic@yahoo.com> wrote:

> I think not out of the box, but look at SOLR-243 issue in JIRA.
>
> You could also put your index on ram disk (tmpfs), but it would be useless
> for writing to it.
>
> Note that when people ask about loading the whole index in memory
> explicitly, it's often a premature optimization attempt.
>
> Otis
> --
> Sematext is hiring -- http://sematext.com/about/jobs.html?mls
> Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR
>
>
>
> ----- Original Message ----
> > From: Thomas Nguyen <th...@ign.com>
> > To: solr-user@lucene.apache.org
> > Sent: Wed, November 11, 2009 8:46:11 PM
> > Subject: Configuring Solr to use RAMDirectory
> >
> > Is it possible to configure Solr to fully load indexes in memory?  I
> > wasn't able to find any documentation about this on either their site or
> > in the Solr 1.4 Enterprise Search Server book.
>
>


-- 
Andrew Klochkov
Senior Software Engineer,
Grid Dynamics

Re: Configuring Solr to use RAMDirectory

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I think not out of the box, but look at SOLR-243 issue in JIRA.

You could also put your index on ram disk (tmpfs), but it would be useless for writing to it.

Note that when people ask about loading the whole index in memory explicitly, it's often a premature optimization attempt.

Otis
--
Sematext is hiring -- http://sematext.com/about/jobs.html?mls
Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR



----- Original Message ----
> From: Thomas Nguyen <th...@ign.com>
> To: solr-user@lucene.apache.org
> Sent: Wed, November 11, 2009 8:46:11 PM
> Subject: Configuring Solr to use RAMDirectory
> 
> Is it possible to configure Solr to fully load indexes in memory?  I
> wasn't able to find any documentation about this on either their site or
> in the Solr 1.4 Enterprise Search Server book.