filtering by docid range?

Matthew Somerville matthew at mysociety.org
Fri Feb 12 08:43:38 GMT 2021


Just for interest, dunno if helpful (or a good way of doing it!), what
we do (for email alerting) is record an incrementing batch number B123
with each indexing pass of data, and then for an alert run only search
for results with batch numbers since the last alert run.

ATB,
Matthew

On Mon, 8 Feb 2021 at 18:07, Eric Wong <e at 80x24.org> wrote:
>
> Hey all, is there a way to exclude results by docid?
>
> I'm using a combined DB and guaranteeing the order for
> ->add_database calls.  All sub DBs have monotonically
> increasing docids, so the combined docid will remain
> monotonically increasing.
>
> I'll store the maximum docid from a previous search ($OLD_MAX),
> and it would be nice to have Xapian only could return results it
> hasn't returned before.  Otherwise, I'll continue using:
>
>         set_weighting_scheme(BoolWeight->new)
>         set_docid_order(ENQ_DESCENDING)
>
> ...and stop iterating mset retrieval once $docid < $OLD_MAX
>
> I'm using Perl Search::Xapian from Debian stable (buster).
>
> Thanks
>



More information about the Xapian-discuss mailing list