Olly Betts <olly at survex.com> wrote:> On Sat, Feb 08, 2020 at 06:04:42PM +0000, Eric Wong wrote: > > Olly Betts <olly at survex.com> wrote: > > > On Fri, Feb 07, 2020 at 09:33:08PM +0000, Eric Wong wrote: > > > > Or would I fiddle with wdf_inc for all ->index_text and ->add_term > > > > calls on a per-DB basis? > > > > > > That would probably work if you don't want to be able to vary the > > > prioritisation dynamically. > > > > That's a compromise I'll have to make, for now. Thanks for the > > response! > > BTW, for either approach try to add the databases which are more boosted > first. That will tend to mean more good matches are found sooner, which > will help the matcher take short cuts.Thanks, I'll keep that in mind. Btw, is there a way to quickly figure out which sub-DB a retrieved document or mset item belongs to? I suppose I could add that info to docdata since I'm having to reindex, anyways...
On Wed, Feb 19, 2020 at 10:23:09AM +0000, Eric Wong wrote:> Btw, is there a way to quickly figure out which sub-DB a retrieved > document or mset item belongs to?Yes: https://trac.xapian.org/wiki/FAQ/MultiDatabaseDocumentID 1.4.12 added a Database::size() method which reports the number of shards - for older versions you have to keep track of that yourself (which needs a little care as add_database() "flattens", so after db1.add_database(db2) db1.size() will have increased by db2.size() (which could be 0 if db2 has no shards). Cheers, Olly
Olly Betts <olly at survex.com> wrote:> On Wed, Feb 19, 2020 at 10:23:09AM +0000, Eric Wong wrote: > > Btw, is there a way to quickly figure out which sub-DB a retrieved > > document or mset item belongs to? > > Yes: https://trac.xapian.org/wiki/FAQ/MultiDatabaseDocumentID > > 1.4.12 added a Database::size() method which reports the number of > shards - for older versions you have to keep track of that yourself > (which needs a little care as add_database() "flattens", so after > db1.add_database(db2) db1.size() will have increased by db2.size() > (which could be 0 if db2 has no shards).Thanks, I'll have to use the older ways... Btw, is the XS Perl binding going to be updated for Database::size()? Or is the SWIG binding the only way forward? Fwiw, I also wrote about some issues I found with the SWIG binding sometime back: https://trac.xapian.org/ticket/523#comment:13 (but I've worked around the issues and public-inbox supports both SWIG and XS on FreeBSD systems) I'm mainly on Debian 10, and there'll still be users on CentOS 7.x for a while :<