Re: utility methods to get field values from index

2015-05-13 Thread Parvesh Garg
Hi Shalin, Thanks for your answer. Forgot to mention that we are using 4.10 solr. Also, I tried using docValues and the performance was worse than getting it from stored values. Time taken to retrieve data for 2000 docs for 2 fields was 120 ms vs 230 ms previously and for docValues respectively.

Re: utility methods to get field values from index

2015-05-12 Thread Shalin Shekhar Mangar
In Solr 5.0+ you can use Lucene's DocValues API to read the indexed information. This is a unifying API over field cache and doc values so it can be used on all indexed fields. e.g. for single-valued field use searcher.getLeafReader().getSortedDocValues(fieldName); and for multi-valued fields use

utility methods to get field values from index

2015-05-12 Thread Parvesh Garg
Hi All, Was wondering if there is any class in Solr that provides utility methods to fetch indexed field values for documents using docId. Something simple like getMultiLong(String field, int docId) getLong(String field, int docId) We have written a solr component to return group level stats li