jpountz commented on a change in pull request #779: LUCENE-8762: Introduce 
Specialized Impacts For Doc + Freq
URL: https://github.com/apache/lucene-solr/pull/779#discussion_r303851882
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50PostingsReader.java
 ##########
 @@ -234,7 +234,9 @@ public ImpactsEnum impacts(FieldInfo fieldInfo, 
BlockTermState state, int flags)
     final boolean indexHasOffsets = 
fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS)
 >= 0;
     final boolean indexHasPayloads = fieldInfo.hasPayloads();
 
-    if (indexHasPositions &&
+   if (indexHasPositions == false || PostingsEnum.featureRequested(flags, 
PostingsEnum.POSITIONS) == false) {
+      return new BlockImpactsDocsEnum(fieldInfo, (IntBlockTermState) state);
+    } else if (indexHasPositions &&
 
 Review comment:
   indentation looks wrong?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to