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 Pushkar Raste <pu...@gmail.com> on 2015/12/03 20:19:40 UTC

Using properties placeholder ${someProperty} for xml node attribute in solrconfig

Hi,
I want to make turning filter cache on/off configurable (I really have a
use case to turn off filter cache), can I use properties placeholders like
${someProperty} in the filter cache config. i.e.

<filterCache class="solr.FastLRUCache"
                     size="${solr.filterCacheSize:4096}"
                     initialSize=""${solr.filterCacheInitialSize:2048}"
                     autowarmCount="0"/>

In short, can I use properties placeholders for attributes for xml node in
solrconfig. Follow up question is, provided I can do that, to turn off
filterCache can I simply set values 0 (zero) for 'solr.filterCacheSize' and
'solr.filterCacheInitialSize'

Re: Using properties placeholder ${someProperty} for xml node attribute in solrconfig

Posted by Pushkar Raste <pu...@gmail.com>.
Thanks Erick, I verified that we can use properties placeholders for
attributes on a xml node. One last question. I was reading through
CommitTracker and looks like setting maxTime for 'autoCommit' or '
autoSoftCommit' will disable commits. Is my understanding right?

On 3 December 2015 at 15:40, Erick Erickson <er...@gmail.com> wrote:

> Hmmm, never tried it. You can check by looking at the admin
> UI>>plugins/stats>>cahces>>filterCache with a property defined like
> you want.
>
> And assuming that works, yes. the filterCache is turned off if its size is
> zero.
>
> Another option might be to add {!cache=false} to your fq clauses on
> the client in this case if that is possible/convenient.
>
> Best,
> Erick
>
> On Thu, Dec 3, 2015 at 11:19 AM, Pushkar Raste <pu...@gmail.com>
> wrote:
> > Hi,
> > I want to make turning filter cache on/off configurable (I really have a
> > use case to turn off filter cache), can I use properties placeholders
> like
> > ${someProperty} in the filter cache config. i.e.
> >
> > <filterCache class="solr.FastLRUCache"
> >                      size="${solr.filterCacheSize:4096}"
> >                      initialSize=""${solr.filterCacheInitialSize:2048}"
> >                      autowarmCount="0"/>
> >
> > In short, can I use properties placeholders for attributes for xml node
> in
> > solrconfig. Follow up question is, provided I can do that, to turn off
> > filterCache can I simply set values 0 (zero) for 'solr.filterCacheSize'
> and
> > 'solr.filterCacheInitialSize'
>

Re: Using properties placeholder ${someProperty} for xml node attribute in solrconfig

Posted by Erick Erickson <er...@gmail.com>.
Hmmm, never tried it. You can check by looking at the admin
UI>>plugins/stats>>cahces>>filterCache with a property defined like
you want.

And assuming that works, yes. the filterCache is turned off if its size is zero.

Another option might be to add {!cache=false} to your fq clauses on
the client in this case if that is possible/convenient.

Best,
Erick

On Thu, Dec 3, 2015 at 11:19 AM, Pushkar Raste <pu...@gmail.com> wrote:
> Hi,
> I want to make turning filter cache on/off configurable (I really have a
> use case to turn off filter cache), can I use properties placeholders like
> ${someProperty} in the filter cache config. i.e.
>
> <filterCache class="solr.FastLRUCache"
>                      size="${solr.filterCacheSize:4096}"
>                      initialSize=""${solr.filterCacheInitialSize:2048}"
>                      autowarmCount="0"/>
>
> In short, can I use properties placeholders for attributes for xml node in
> solrconfig. Follow up question is, provided I can do that, to turn off
> filterCache can I simply set values 0 (zero) for 'solr.filterCacheSize' and
> 'solr.filterCacheInitialSize'