DocValues has nothing to do with your handler. It is a field property. To use it simply put docValues=true in your field definitions and reindex.
On Mon, 15 Feb 2016, 18:40 Neeraj Lajpal <neera...@outlook.com> wrote: > Hi, > I recently asked this question on stackoverflow: > I am trying to access a field in custom request handler. I am accessing it > like this for each document: > Document doc;doc = reader.document(id);DocFields = > doc.getValues("state");There are around 600,000 documents in the solr. For > a query running on all the docs, it is taking more than 65 seconds. > I have also tried SolrIndexSearcher.doc method, but it is also taking > around 60 seconds. > Removing the above lines of code bring down the qtime to milliseconds. > But, I need to access that field for my algo. > Is there a more optimised way to do this? > > > > In reply, I got a suggestion to use docValues. I read about it and it > seems to be useful for my case. But, I am unable to find/figure out how to > use it in my custom request handler. > Please tell me if there is some function/api to access a docValue field > from custom handler, that takes input the doc-id and field. > Thanks,Neeraj Lajpal -- Regards, Binoy Dalal