What does "showItems" config mean on fieldValueCache mean?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What does "showItems" config mean on fieldValueCache mean?

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

--
Stephen Duncan Jr
www.stephenduncanjr.com
Reply | Threaded
Open this post in threaded view
|

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

Erik Hatcher

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);
       }

     }

Reply | Threaded
Open this post in threaded view
|

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

jrduncans
On Thu, Jul 30, 2009 at 4:18 PM, Erik Hatcher <[hidden email]>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