Had you check
https://lucene.apache.org/solr/6_0_0/solr-core/org/apache/solr/request/SolrRequestInfo.html#getRsp--
?
27 мая 2016 г. 16:55 пользователь "Upayavira" <[email protected]> написал:
> In a JSON response, we get this:
>
> {
> "responseHeader": {...},
> "response": { "docs": [...] },
> "highlighting": {...}
> ...
> }
>
> I'm assuming that the getProcessedDocuments call would give me the docs:
> {} element, whereas I'm after the whole response so I can retrieve the
> "highlighting" element.
>
> Make sense?
>
> On Fri, 27 May 2016, at 02:45 PM, Mikhail Khludnev wrote:
> > Upayavira,
> >
> > It's not clear what do you mean in "results themselves", perhaps you mean
> > SolrDocuments ?
> >
> > public abstract class ResultContext {
> > ..
> > public Iterator<SolrDocument> getProcessedDocuments() {
> > return new DocsStreamer(this);
> > }
> >
> > On Fri, May 27, 2016 at 4:15 PM, Upayavira <[email protected]> wrote:
> >
> > > Yes, I've seen that. I can see the getDocList() method will presumably
> > > give me the results themselves, but I need the full response so I can
> > > get the highlighting details, but I can't see them anywhere.
> > >
> > > On Thu, 26 May 2016, at 09:39 PM, Mikhail Khludnev wrote:
> > > > public abstract class ResultContext {
> > > >
> > > > /// here are all results
> > > > public abstract DocList getDocList();
> > > >
> > > > public abstract ReturnFields getReturnFields();
> > > >
> > > > public abstract SolrIndexSearcher getSearcher();
> > > >
> > > > public abstract Query getQuery();
> > > >
> > > > public abstract SolrQueryRequest getRequest();
> > > >
> > > > On Thu, May 26, 2016 at 11:25 PM, Upayavira <[email protected]> wrote:
> > > >
> > > > > Hi Mikhail,
> > > > >
> > > > > Is there really? If I look at ResultContext, I see it is an
> abstract
> > > > > class, completed by BasicResultContext. I don't see any context
> method
> > > > > there. I can see a getContext() on SolrQueryRequest which just
> returns
> > > a
> > > > > hashmap. Will I find the response in there? Is that what you are
> > > > > suggesting?
> > > > >
> > > > > Upayavira
> > > > >
> > > > > On Thu, 26 May 2016, at 06:28 PM, Mikhail Khludnev wrote:
> > > > > > Hello,
> > > > > >
> > > > > > There is a protected ResultContext field named context.
> > > > > >
> > > > > > On Thu, May 26, 2016 at 5:31 PM, Upayavira <[email protected]>
> wrote:
> > > > > >
> > > > > > > Looking at the code for a sample DocTransformer, it seems that
> a
> > > > > > > DocTransformer only has access to the document itself, not to
> the
> > > whole
> > > > > > > results. Because of this, it isn't possible to use a
> > > DocTransformer to
> > > > > > > merge, for example, the highlighting results into the main
> > > document.
> > > > > > >
> > > > > > > Am I missing something?
> > > > > > >
> > > > > > > Upayavira
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Sincerely yours
> > > > > > Mikhail Khludnev
> > > > > > Principal Engineer,
> > > > > > Grid Dynamics
> > > > > >
> > > > > > <http://www.griddynamics.com>
> > > > > > <[email protected]>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Sincerely yours
> > > > Mikhail Khludnev
> > > > Principal Engineer,
> > > > Grid Dynamics
> > > >
> > > > <http://www.griddynamics.com>
> > > > <[email protected]>
> > >
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> > Principal Engineer,
> > Grid Dynamics
> >
> > <http://www.griddynamics.com>
> > <[email protected]>
>