search for: postlist_end

Displaying 7 results from an estimated 7 matches for "postlist_end".

2023 Mar 27
1
uncaught C++ exception from Perl Search::Xapian XS?
...ng Search::Xapian XS from Debian stable and I'm getting what appears to be an unwrapped C++ exception: terminate called after throwing an instance of 'Xapian::DatabaseModifiedError' Using `eval' from Perl5 doesn't seem effective in catching it. I'm using postlist_begin, postlist_end and ++ to iterate a PositionIterator, and reading XS/*Iterator.xs, I see the XS wrappers are missing: try { } catch { handle_exception(); } in several places. Not sure if that's it or if something else (I know C, but am not remotely fluent in C++). Thanks
2017 Jun 06
1
Test for the end of PostingIterator in perl?
Hi all. I want to iterate over all the documents in my database. my $pi = $db->postlist_begin(""); while ("$pi" =~ qr/END/) { my $oldid = $pi->get_docid; $pi++; #... } That used to work with Search::Xapian in perl version 1.2, but now with xapian-bindings-1.4.4 it does not seem to. How are you supposed to tell when you have reached the
2023 Mar 28
1
uncaught C++ exception from Perl Search::Xapian XS?
...able and I'm getting what > appears to be an unwrapped C++ exception: > > terminate called after throwing an instance of 'Xapian::DatabaseModifiedError' > > Using `eval' from Perl5 doesn't seem effective in catching it. > > I'm using postlist_begin, postlist_end and ++ to iterate a > PositionIterator, and reading XS/*Iterator.xs, I see the XS > wrappers are missing: FWIW, postlist_begin gives you a PostingIterator (positionlist_begin would give you a PositionIterator). > try { } catch { handle_exception(); } > > in several places. Not...
2013 Jun 19
2
Compact databases and removing stale records at the same time
...ase(Xapian::Database(*sources++)); } /* create a destination database */ Xapian::WritableDatabase destdb = Xapian::WritableDatabase(dest, Xapian::DB_CREATE); /* copy all matching documents to the new DB */ Xapian::PostingIterator it; for (it = srcdb.postlist_begin(""); it != srcdb.postlist_end(""); it++) { Xapian::docid did = *it; Xapian::Document doc = srcdb.get_document(did); std::string cyrusid = doc.get_value(SLOT_CYRUSID); if (cb(cyrusid.c_str(), rock)) { destdb.add_document(doc); } } /* commit all changes explicitly */ destdb.commit(); }...
2010 Jan 16
1
PHP XapianTermIterator/XapianPositionIterator usage
Hello again, /thanks to Peter for previous response. I've been digging around trying to find sample usage of XapianTermIterator/XapianPositionIterator in PHP. The idea is to code up a test case in PHP to perform snippet extraction (with a possible view to coding a pecl extension in C). I found a C++ sample, but that wasn't much help. I must be dense this morning though, since I
2009 Jan 27
1
Segmentation fault in MSetIterator get_weight
Hi, I'm using xapian with c# and mono and i'm having a segfault in get_weight. When i print the index variable, the value is clearly too high. I think something write over it. Do you have any idea on how i could trace the beginning of the segmentation fault ? Thanks, -- Yann
2013 Jun 19
2
Compact databases and removing stale records at the same time
I'm trying to compact (or at least merge) multiple databases, while stripping search records which are no longer required. Backstory: I've inherited the Cyrus IMAPd xapian-based search code from Greg Banks when he left Opera. One of the unfinished parts was removing expunged emails from the search database. We moved from having a single search database to supporting multiple