[ 
https://issues.apache.org/jira/browse/LUCENE-8478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604648#comment-16604648
 ] 

Christine Poerschke commented on LUCENE-8478:
---------------------------------------------

bq. ... it would be more natural to expect callers to pass the ImpactsDisi 
instead ...

The latest patch attempts that. Analytically it _seems_ that the changes should 
work including but not limited to the
{code}
  @Override
   public DocIdSetIterator iterator() {
-    return iterator;
+    return impactsDisi;
   }
{code}
change but upon running the unit tests there are some unexpected failures e.g.
{code}
[junit4]    > Throwable #1: java.lang.ClassCastException: 
org.apache.lucene.search.ImpactsDISI cannot be cast to 
org.apache.lucene.index.PostingsEnum
[junit4]    >   at 
__randomizedtesting.SeedInfo.seed([208EFB26D8786:AF4778792DAB1D1B]:0)
[junit4]    >   at 
org.apache.lucene.search.SynonymQuery$SynonymScorer.freq(SynonymQuery.java:448)
[junit4]    >   at 
org.apache.lucene.search.SynonymQuery$SynonymScorer.score(SynonymQuery.java:460)
{code}
so not sure if this is worth pursuing further or not.

> combine TermScorer constructors' implementation
> -----------------------------------------------
>
>                 Key: LUCENE-8478
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8478
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: master (8.0)
>            Reporter: Christine Poerschke
>            Priority: Minor
>         Attachments: LUCENE-8478.patch, LUCENE-8478.patch
>
>
> We currently have two {{TermScorer}} constructor variants and it's not 
> immediately obvious how and why their implementations are the way they are as 
> far as initialisations and initialisation order is concerned. Combination of 
> the logic could make the commonalities and differences clearer.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to