Ticket #838: candidate-fix.patch

File candidate-fix.patch, 917 bytes (added by Olly Betts, 3 weeks ago)

Candidate fix

  • xapian-core/api/queryinternal.cc

    commit bd64da56c0bf2f8895ba24d26e1d03128cf000bd
    Author: Olly Betts <olly@survex.com>
    Date:   Fri May 2 14:36:35 2025 +1200
    
        WIP
    
    diff --git a/xapian-core/api/queryinternal.cc b/xapian-core/api/queryinternal.cc
    index f9357ba4bb62..9c8d82a2cdbd 100644
    a b AndContext::postlist(TermFreqs* termfreqs)  
    785785        break;
    786786      default:
    787787        pl.reset(new AndPostList(pls.begin(), pls.end(), matcher));
    788         qopt->add_op(EstimateOp::AND, pls.size(), first, last);
    789788        break;
    790789    }
    791790
    AndContext::postlist(TermFreqs* termfreqs)  
    833832        not_ctx.reset();
    834833    }
    835834
     835    if (pls.size() > 1) {
     836        qopt->add_op(EstimateOp::AND, pls.size(), first, last);
     837    }
     838
    836839    // Sort the positional filters to try to apply them in an efficient order.
    837840    // FIXME: We need to figure out what that is!  Try applying lowest cf/tf
    838841    // first?