any help plz !!!
On Mon, Jul 15, 2013 at 4:13 PM, Tony Mullins <tonymullins...@gmail.com>wrote: > Please any help on how to get the value of 'freq' field in my custom > SearchComponent ? > > > http://localhost:8080/solr/collection2/demoendpoint?q=spider&wt=xml&indent=true&fl=*,freq:termfreq%28product,%27spider%27%29 > > <doc><str name="id">11</str><str name="type">Video Games</str><str > name="format">xbox 360</str><str name="product">The Amazing > Spider-Man</str><int name="popularity">11</int><long > name="_version_">1439994081345273856</long><int name="freq">1</int></doc> > > > > Here is my code > > DocList docs = rb.getResults().docList; > DocIterator iterator = docs.iterator(); > int sumFreq = 0; > String id = null; > > for (int i = 0; i < docs.size(); i++) { > try { > int docId = iterator.nextDoc(); > > // Document doc = searcher.doc(docId, fieldSet); > Document doc = searcher.doc(docId); > > In doc object I can see the schema fields like 'id', 'type','format' etc. > but I cannot find the field 'freq' which I needed. Is there any way to get > the FunctionQuery fields in doc object ? > > Thanks, > Tony > > > > On Mon, Jul 15, 2013 at 1:16 PM, Tony Mullins <tonymullins...@gmail.com>wrote: > >> Hi, >> >> I have extended Solr's SearchComonent class and I am iterating through >> all the docs in ResponseBuilder in @overrider Process() method. >> >> Here I want to get the value of FucntionQuery result but in Document >> object I am only seeing the standard field of document not the >> FucntionQuery result. >> >> This is my query >> >> >> http://localhost:8080/solr/collection2/demoendpoint?q=spider&wt=xml&indent=true&fl=*,freq:termfreq%28product,%27spider%27%29 >> >> Result of above query in browser shows me that 'freq' is part of <doc> >> but its not there in Document object in my @overrider Process() method. >> >> How can I get the value of FunctionQuery result in my custom >> SearchComponent ? >> >> Thanks, >> Tony >> > >