lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <m...@apache.org>
Subject Re: Is that a mistake or bug?
Date Mon, 03 Sep 2018 05:36:10 GMT
It's neither, it's on purpose. By default  result.segmentTerminatedEarly is
null, hence it doesn't appear in result output. see
ResponseBuilder.setResult(QueryResult).
So, if cmd requests early termination, it sets false by default, enabling
"false" output even it won't be the case. And later it might be flipped to
true.


On Mon, Sep 3, 2018 at 5:57 AM zhenyuan wei <tinswzy@gmail.com> wrote:

> Hi all,
>     I saw the code like following:
>
> QueryResult result = new QueryResult();
>
>
> cmd.setSegmentTerminateEarly(params.getBool(CommonParams.SEGMENT_TERMINATE_EARLY,
> CommonParams.SEGMENT_TERMINATE_EARLY_DEFAULT));
> if (cmd.getSegmentTerminateEarly()) {
>   result.setSegmentTerminatedEarly(Boolean.FALSE);
> }
>
> It says if request's param segmentTerminateEarly=true, which means search
> maybe terminated early within a segment,  then set
> result.setSegmentTerminatedEarly as false , this code is of a little
> confusion
> .
>


-- 
Sincerely yours
Mikhail Khludnev

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message