Olly Betts
2021-Sep-13 01:44 UTC
Xapian::Termiterator is not working the way it used to with perl
On Sun, Sep 12, 2021 at 03:29:05PM -0400, Jim wrote:> I discovered the answer to this.? Search::Xapian is the XS bindings while > Xapian is the the SWIG generated bindings.? Since I couldn't figure out how > to get DateRangeProcessor or NumberRangeProcessor to work, and I found an > example that used the SWIG bindings, I switched.? That may account for the > change in behavior of the Termiterator.? Is there documentation for the SWIG > bindings?Yes, see the POD docs for the Xapian module, e.g.: perldoc Xapian In particular the COMPATIBILITY section should answer all your questions about stringification changes. (I have just pushed a fix for the misformatting of code snippets containing `>`). Cheers, Olly
Olly Betts
2021-Sep-13 03:48 UTC
Xapian::Termiterator is not working the way it used to with perl
On Mon, Sep 13, 2021 at 02:44:12AM +0100, Olly Betts wrote:> In particular the COMPATIBILITY section should answer all your questions > about stringification changes.There's also technical background as to what blocks us implementing stringification when using SWIG (at least currently) here: https://github.com/swig/swig/issues/1771 As I mentioned there, longer term I'm hoping to add back stringification to our SWIG-generated perl bindings, but have it consistently call get_description() for all objects which have such a method. Cheers, Olly
Jim
2021-Sep-13 11:32 UTC
Xapian::Termiterator is not working the way it used to with perl
Yes, I used the get_termname() function and it worked like a charm, almost.? Actually that gave me the answer I needed but the loop kept quitting with a SEGV.? I tracked it down the the overloaded ++.? When I replaced $xit++ with $xit->inc() it kept running.? Guess there's more than one problem with overloading. Thanks, Jim. On 9/12/21 9:44 PM, Olly Betts wrote:> On Sun, Sep 12, 2021 at 03:29:05PM -0400, Jim wrote: >> I discovered the answer to this.? Search::Xapian is the XS bindings while >> Xapian is the the SWIG generated bindings.? Since I couldn't figure out how >> to get DateRangeProcessor or NumberRangeProcessor to work, and I found an >> example that used the SWIG bindings, I switched.? That may account for the >> change in behavior of the Termiterator.? Is there documentation for the SWIG >> bindings? > Yes, see the POD docs for the Xapian module, e.g.: > > perldoc Xapian > > In particular the COMPATIBILITY section should answer all your questions > about stringification changes. > > (I have just pushed a fix for the misformatting of code snippets > containing `>`). > > Cheers, > Olly