Skip to content

Conversation

@wuyunfeng
Copy link
Member

@wuyunfeng wuyunfeng commented Jun 2, 2020

The other PR : #3513 (#3479) try to resolved the inner hits node is not an array because when a query( batch-size) run against new segment without this field, as-well the filter_path just only take hits.hits.fieldshits.hits._source into account, this would appear an null inner hits node:

{
   "_scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAHaUWY1ExUVd0ZWlRY2",
   "hits": {
      "total": 1
   }
}

Unfortunately this PR introduce another serious inconsistent result with different batch_size because of misusing the total.

To avoid this two problem, we just add hits.hits._score to filter_path when docvalue_mode is true, _score would always null , and populate the inner hits node:

{
   "_scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAHaUWY1ExUVd0ZWlRY2",
   "hits": {
      "total": 1,
      "hits": [
         {
            "_score": null
         }
      ]
   }
}

related issue: #3752

@wuyunfeng wuyunfeng changed the title [Doirs On ES] bug-fix for incorrect result for docvalue context [Doirs On ES] bug-fix for incorrect result for docvalue scan mode Jun 2, 2020
@BabySid
Copy link
Contributor

BabySid commented Jun 3, 2020

lgtm

@wuyunfeng wuyunfeng changed the title [Doirs On ES] bug-fix for incorrect result for docvalue scan mode [Doirs On ES] Bug-Fix for incorrect result for docvalue scan mode Jun 3, 2020
@wuyunfeng wuyunfeng changed the title [Doirs On ES] Bug-Fix for incorrect result for docvalue scan mode [Doris On ES] Bug-Fix for incorrect result for docvalue scan mode Jun 3, 2020
Copy link
Contributor

@imay imay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imay imay added approved Indicates a PR has been approved by one committer. area/doris-on-es Issues or PRs related to Doris on ElasticSearch kind/fix Categorizes issue or PR as related to a bug. labels Jun 3, 2020
@imay imay self-assigned this Jun 3, 2020
@imay imay merged commit 484e7de into apache:master Jun 4, 2020
morningman pushed a commit to morningman/doris that referenced this pull request Jun 7, 2020
…ake usage of total (apache#3751)

The other PR : apache#3513 (apache#3479) try to resolved the `inner hits node is not an array` because when a  query( batch-size) run against new segment without this field, as-well the filter_path just only take `hits.hits.fields` 、`hits.hits._source` into account, this would appear an null inner hits node:
```
{
   "_scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAHaUWY1ExUVd0ZWlRY2",
   "hits": {
      "total": 1
   }
}
```

Unfortunately this PR introduce another serious inconsistent result with different batch_size because of misusing the `total`.

To avoid this two problem,  we just add `hits.hits._score` to filter_path when `docvalue_mode` is true,   `_score`  would always `null` ,  and populate the inner hits node:

```
{
   "_scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAHaUWY1ExUVd0ZWlRY2",
   "hits": {
      "total": 1,
      "hits": [
         {
            "_score": null
         }
      ]
   }
}
```

related issue: apache#3752
@wuyunfeng wuyunfeng deleted the doe-bugfix branch June 9, 2020 09:52
@wuyunfeng wuyunfeng changed the title [Doris On ES] Bug-Fix for incorrect result for docvalue scan mode [Doris On ES][Bug-Fix] Incorrect result for docvalue scan mode Jul 21, 2020
@EmmyMiao87 EmmyMiao87 mentioned this pull request Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/doris-on-es Issues or PRs related to Doris on ElasticSearch kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants