You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Vadim Gindin <vg...@detectum.com> on 2018/06/25 20:39:28 UTC

Explain flag in CustomQuery

Hi All.

I've found that explain flag (that is set via URL) is transferred to
DefaultSearchContext. I'd like to check this flag in my CustomQuery. I
expected that SearchContext will be propagated to a Query, but I didn't
found the way how to get. I only have LeafReaderContext or LeafReader.
Could you advice me?

Regards,
Vadim Gindin

Re: Explain flag in CustomQuery

Posted by Vadim Gindin <vg...@detectum.com>.
Hi, Mikhail!

That is the real answer :). In other words: Lucene Searcher has 2 separate
APIs: search and explain. They are independent with each other. At the same
time, Elasticsearch provides the other approach where *explain *is not a
"separate action", but is an additional setting to a *search *action. I'll
probably ask that in Elasticsearch forum.  Thanks :)

Regards
Vadim Gindin

On Tue, Jun 26, 2018 at 1:48 AM Mikhail Khludnev <mk...@apache.org> wrote:

> Vadim,
> Why wouldn't you ask in Elastic forum?
>
> On Mon, Jun 25, 2018 at 11:39 PM Vadim Gindin <vg...@detectum.com>
> wrote:
>
> > Hi All.
> >
> > I've found that explain flag (that is set via URL) is transferred to
> > DefaultSearchContext. I'd like to check this flag in my CustomQuery. I
> > expected that SearchContext will be propagated to a Query, but I didn't
> > found the way how to get. I only have LeafReaderContext or LeafReader.
> > Could you advice me?
> >
> > Regards,
> > Vadim Gindin
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Re: Explain flag in CustomQuery

Posted by Mikhail Khludnev <mk...@apache.org>.
Vadim,
Why wouldn't you ask in Elastic forum?

On Mon, Jun 25, 2018 at 11:39 PM Vadim Gindin <vg...@detectum.com> wrote:

> Hi All.
>
> I've found that explain flag (that is set via URL) is transferred to
> DefaultSearchContext. I'd like to check this flag in my CustomQuery. I
> expected that SearchContext will be propagated to a Query, but I didn't
> found the way how to get. I only have LeafReaderContext or LeafReader.
> Could you advice me?
>
> Regards,
> Vadim Gindin
>


-- 
Sincerely yours
Mikhail Khludnev