Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of ghost fields in string sorts. #11792

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Sep 20, 2022

Introduction of dynamic pruning for string sorts (#11669) introduced a bug with string sorts and ghost fields, triggering a NullPointerException because the code assumes that LeafReader#terms is not null if the field is indexed according to field infos.

This commit fixes the issue and adds tests for ghost fields across all sort types.

Hopefully we can simplify and remove the null check in the future when we improve handling of ghost fields (#11393).

Introduction of dynamic pruning for string sorts (apache#11669) introduced a bug with
string sorts and ghost fields, triggering a `NullPointerException` because the
code assumes that `LeafReader#terms` is not null if the field is indexed
according to field infos.

This commit fixes the issue and adds tests for ghost fields across all sort
types.

Hopefully we can simplify and remove the null check in the future when we
improve handling of ghost fields (apache#11393).
Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

LGTM

@jpountz jpountz merged commit 6c46662 into apache:main Sep 20, 2022
@jpountz jpountz deleted the string_sort_ghost branch September 20, 2022 11:49
jpountz added a commit that referenced this pull request Sep 20, 2022
Introduction of dynamic pruning for string sorts (#11669) introduced a bug with
string sorts and ghost fields, triggering a `NullPointerException` because the
code assumes that `LeafReader#terms` is not null if the field is indexed
according to field infos.

This commit fixes the issue and adds tests for ghost fields across all sort
types.

Hopefully we can simplify and remove the null check in the future when we
improve handling of ghost fields (#11393).
jpountz added a commit that referenced this pull request Sep 20, 2022
Introduction of dynamic pruning for string sorts (#11669) introduced a bug with
string sorts and ghost fields, triggering a `NullPointerException` because the
code assumes that `LeafReader#terms` is not null if the field is indexed
according to field infos.

This commit fixes the issue and adds tests for ghost fields across all sort
types.

Hopefully we can simplify and remove the null check in the future when we
improve handling of ghost fields (#11393).
@jpountz jpountz added this to the 9.4.0 milestone Sep 20, 2022
wjp719 added a commit to wjp719/lucene that referenced this pull request Sep 21, 2022
* main: (324 commits)
  Mute TestKnnVectorQuery#testFilterWithSameScore while we work on a fix
  Guard FieldExistsQuery against null pointers (apache#11794)
  Fix handling of ghost fields in string sorts. (apache#11792)
  LUCENE-10365 Wizard changes contributed from Solr (apache#591)
  GitHub Workflows security hardening (apache#11789)
  Improve tessellator performance by delaying calls to the method #isIntersectingPolygon (apache#11786)
  update DOAP and releaseWizard to reflect migration to github (apache#11747)
  Diversity check bugfix (apache#11781)
  Fix rare bug in TestKnnVectorQuery when we have multiple segments
  GITHUB#11778: Add detailed part-of-speech tag for particle and ending on Nori (apache#11779)
  LUCENE-10674: Move changes entry to 9.4.
  apacheGH-11172: remove WindowsDirectory and native subproject. (apache#11774)
  LUCENE-10674: Ensure BitSetConjDISI returns NO_MORE_DOCS when sub-iterator exhausts. (apache#1068)
  Removed duplicate check in SpanGradientFormatter (apache#11762)
  Fix integer overflow in tests.
  GITHUB#11742: MatchingFacetSetsCounts#getTopChildren now returns top children instead of all children (apache#11764)
  Retry gradle wrapper download on http 500 and 503. (apache#11766)
  Fix a typo affecting Luke (apache#11763)
  Fix IntervalBuilder.NO_INTERVALS docId when unpositioned (apache#11760)
  LUCENE-10592 Better estimate memory for HNSW graph (apache#11743)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants