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 Stephen Duncan Jr <st...@gmail.com> on 2009/07/30 21:32:08 UTC

What does "showItems" config mean on fieldValueCache mean?

What's the effect of showItems attribute on the fieldValueCache in Solr 1.4?

-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Re: What does "showItems" config mean on fieldValueCache mean?

Posted by Stephen Duncan Jr <st...@gmail.com>.
On Thu, Jul 30, 2009 at 4:18 PM, Erik Hatcher <er...@ehatchersolutions.com>wrote:

>
> On Jul 30, 2009, at 3:32 PM, Stephen Duncan Jr wrote:
>
>  What's the effect of showItems attribute on the fieldValueCache in Solr
>> 1.4?
>>
>
> Just outputs details of the last accessed items from the cache in the stats
> display.
>
>        Erik
>
>    if (showItems != 0) {
>      Map items = cache.getLatestAccessedItems( showItems == -1 ?
> Integer.MAX_VALUE : showItems );
>      for (Map.Entry e : (Set <Map.Entry>)items.entrySet()) {
>        Object k = e.getKey();
>        Object v = e.getValue();
>
>        String ks = "item_" + k;
>        String vs = v.toString();
>        lst.add(ks,vs);
>      }
>
>    }
>
>
Makes sense.  Thanks!

-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Re: What does "showItems" config mean on fieldValueCache mean?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 30, 2009, at 3:32 PM, Stephen Duncan Jr wrote:

> What's the effect of showItems attribute on the fieldValueCache in  
> Solr 1.4?

Just outputs details of the last accessed items from the cache in the  
stats display.

	Erik

     if (showItems != 0) {
       Map items = cache.getLatestAccessedItems( showItems == -1 ?  
Integer.MAX_VALUE : showItems );
       for (Map.Entry e : (Set <Map.Entry>)items.entrySet()) {
         Object k = e.getKey();
         Object v = e.getValue();

         String ks = "item_" + k;
         String vs = v.toString();
         lst.add(ks,vs);
       }

     }