search for: termiterator

Displaying 20 results from an estimated 26 matches for "termiterator".

2012 Jul 09
1
Question about Document and TermIterator.get_termfreq()
...document, add a few terms, add the document to a database and then call doc->termlist_begin().get_termfreq(). This throws "Can't get term frequency from a document termlist which is not associated with a database." What I think this means is that I can not call get_termfreq from a TermIterator obtained from a document (this is only available for a TermIterator obtained from a Database object). Am I right? I will add code snippets if it is required. Thanks, Marius -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian...
2012 Sep 19
1
java-swig TermIterator
...llo, Been using Xapian and the Java bindings for years, all was working great, and I all of a sudden decided to upgrade to the latest 1.2.12 and use the new java-swig bindings instead of the old hand-crafted JNI which I think have been deprecated now. I'm struggling with the new design of the TermIterator. More specifically, I can't tell when I've reached the end of the list of terms for my document. If I keep calling next(), it will eventually crash in the C++ code and cause the JVM to crash as well, fair enough. If I call hasNext(), it always returns false, even though there are more ter...
2009 Feb 12
1
problem when using xapian's static libs in windows
...gt;,class std::allocator<char> > const &)const " (?open_post_list at RemoteDatabase@@UBEPAVLeafPostList@@ABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z) libbackend.lib(dbfactory_remote.obj) : error LNK2001: ????????? "public: virtual class Xapian::TermIterator::Internal * __thiscall RemoteDatabase::open_term_list(unsigned int)const " (?open_term_list at RemoteDatabase@@UBEPAVInternal at TermIterator@Xapian@@I at Z) libnet.lib(progclient.obj) : error LNK2001: ????????? "public: virtual class Xapian::TermIterator::Internal * __thiscall RemoteData...
2005 Feb 25
2
Bug in TermIterator::skip_to() ?
Hi all, I've been toying with xapian (mostly using the Python bindings) and I think I've hit a bug in the TermIterator::skip_to() method (or maybe in QuartzAllTermsList::skip_to()). I've attached a c++ source file that demonstrates the issue. In short, if you have a WritableDatabase, ask for the all-terms TermIterator with db.allterms_begin(), and then skip_to() a word that is itself a term, the iterator somet...
2007 Nov 08
1
Perl make test fails on threads in rhel5
Hi all, I've tried building RPMs for RHEL5 and hit this problem in Search::Xapian: make test fails on test 37: ok 34 - check PositionIterator ok 35 - create TermIterator ok 36 - check TermIterator dubious Test returned status 0 (wstat 11, 0xb) DIED. FAILED tests 37-65 Failed 29/65 tests, 55.38% okay $ xapian-config --version xapian-config - xapian-core 1.0.4 $ cat /etc/redhat-release Red Hat Enterprise Linux Client release 5 (Tikanga) $ perl -v...
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
2023 Aug 27
1
DatabaseModifiedError while iterating on mset
...et operations; but now I'm > wondering where I'd hit DatabaseModifiedErrors while inside a > Xapian::MSetIterator loop. > > I assume ->get_document is a place where it gets thrown; > but once a document is retrieved, can iterating through > terms in one document (using TermIterator) also throw DB modified? If you only look at the terms and wdfs then you could only get DatabaseModifiedError on the call to create the TermIterator since the list of terms and wdfs is stored in a single entry per document which is fetched when the iterator is created (it is conceivable this might...
2023 Aug 23
1
DatabaseModifiedError while iterating on mset
...ready retrying the ->get_mset operations; but now I'm wondering where I'd hit DatabaseModifiedErrors while inside a Xapian::MSetIterator loop. I assume ->get_document is a place where it gets thrown; but once a document is retrieved, can iterating through terms in one document (using TermIterator) also throw DB modified? I'm dumping multiple terms per-document to a stream. While retrying ->get_document seems straightforward, retrying midway through a documents terms would require me to introduce extra checks/buffering to avoid duplicate terms on reopen+retry. I'm actually redoi...
2023 Aug 28
1
DatabaseModifiedError while iterating on mset
...> > wondering where I'd hit DatabaseModifiedErrors while inside a > > Xapian::MSetIterator loop. > > > > I assume ->get_document is a place where it gets thrown; > > but once a document is retrieved, can iterating through > > terms in one document (using TermIterator) also throw DB modified? > > If you only look at the terms and wdfs then you could only get > DatabaseModifiedError on the call to create the TermIterator since the > list of terms and wdfs is stored in a single entry per document which > is fetched when the iterator is created (it...
2010 Oct 21
2
In-memory databases vs PHP Bindings
...base via PHP bindings $xdb_doc = new XapianWritableDatabase(PROJROOT.'/tmp/xapian/doc'.$postid, Xapian::DB_CREATE_OR_OVERWRITE); $xdb_doc->add_document($xdoc); $xdb_doc->commit(); Also, FYI, the documentation here seems incomplete: http://xapian.org/docs/apidoc/html/classXapian_1_1TermIterator.html I had to inspect the bindings to find the rather useful get_term() method of the TermIterator class! It does mention the use of the * operator to return the current term but I can't see how I'd invoke that in PHP. If the get_term method applies in all environments, it ought to be...
2006 Jan 30
1
More than one Index?
Morning All, I use scriptindex to build my database and the PHP bindings to pull it all out. Is it possible to have more than one index but select what the bindings search on? So at the moment I index property addresses, I would also like to index property descriptions for more advanced searching but only as an optional extra...probably in an extra search box. Also I would like to analyse the
2011 Mar 07
1
Set Term Frequency for a Query
...dd8cfb7b251fe7986e86390cb>wqf_=1, Xapian::termpos<http://xapian.org/docs/apidoc/html/namespaceXapian.html#e5a16f073d0c8ed54085a9de07248d45>pos_=0) : Xapian::Query query_test(Xapian::Query::OP_OR, Xapian::Query("Bonjour", 10), Xapian::Query("Hello", 5)); Xapian::TermIterator qt = query_test.get_terms_begin(); while (qt != query_test.get_terms_end()) { cout<<*qt<<" "<<qt.get_wdf()<<" "; qt++; } returns : Bonjour 1 Hello 1 I don't understand why get_wdf returns "1" and not Bonjour 10 Hell...
2006 Mar 02
2
Different Collation (utf8_slovak_ci, utf8_danish_ci, latin1_german1_ci) etc.
One issue left for me to figure out is that in different languages there are different characters and Xapian takes only english characters. Thefore many word entered by users that contains their own language special characters will not return any result. MySQL offers different collations ... Now when I see how much data Xapian can search perhaps I could expand my index spider different European
2007 Sep 30
1
Perl example of using termitrator?
I'm having trouble translating from C++ to perl objects. The TermIterator class looks like to get a set of terms in a document you might have C++ code like: Enquire::TermIterator termIt =enquire->get_matching_terms_begin(id); for(;termIt != enquire->get_matching_terms_end(id);termIt++) { string term = *termIt; } Or something similar. However when I attemp...
2013 Oct 30
2
Lucene 3.6.2 backend for xapian (#25)
...some adjustments to the multi-database support, but I think otherwise we'll end up duplicating a lot of that machinery in the Lucene backend anyway. I've not looked at the Lucene file structure with this in mind yet though - do you see any obvious problems with this approach? > Xapian::TermIterator it = db_in.allterms_begin(); > This method traverse all terms in the first segment, then the second > segment, until the last segment. Iteration over all terms should return the terms in sorted order (by byte value) and without duplicates, neither of which is achieved by handling each segmen...
2011 Mar 24
1
Search result hits and locations
Hey Guys, Just making some enquieres for a project i'm goign to be starting using xapian. When searching over a indexed document will i be able to get a list of hits, how many hits and the location fo the hits. I will have boolean searches like eg ("Mysql" AND ("Linux" OR "Windows")) On each hit i will be wanting teh location of the word found and how many
2011 Apr 19
0
Merge databases
...b>wqf_=1, > Xapian::termpos<http://xapian.org/docs/apidoc/html/namespaceXapian.html#e5a16f073d0c8ed54085a9de07248d45>pos_=0) : > > Xapian::Query query_test(Xapian::Query::OP_OR, Xapian::Query("Bonjour", > 10), Xapian::Query("Hello", 5)); > Xapian::TermIterator qt = query_test.get_terms_begin(); > while (qt != query_test.get_terms_end()) > { > cout<<*qt<<" "<<qt.get_wdf()<<" "; > qt++; > } > > returns : Bonjour 1 Hello 1 > > I don't understand why get_wdf re...
2015 Jul 23
1
Get term from document by position
...================================================================= When displaying search results, i would like to to display a piece of the document that is related to the search string (snippet). I have the following idea: 1) first i have to find the positions of the search terms by using Xapian::TermIterator::positionlist_begin() iterator. 2) second, i have to display terms that have positions that are close to the search term position (several terms from the left, and several terms from the right of the search term) So, i know positions of the terms that i want to display. But how to get the terms i...
2014 Apr 13
2
Adding an external library to Xapian
...} // Create an RSet with the listed docids in. Xapian::RSet rset; if (*argv) { - while (*++argv) { - rset.add_document(atoi(*argv)); - } + while (*++argv) { + rset.add_document(atoi(*argv)); + } } + // Log the query + db.log(query_string); + // DB syns + Xapian::TermIterator tmiter = db.synonyms_begin(query_string); + Xapian::TermIterator tmiterend = db.synonyms_end(query_string); + for(;tmiter != tmiterend; ++tmiter) { + cout << "hello" << endl; + cout << *tmiter << endl; + } + + Xapian::Trie trie; // Parse the query string to...
2012 Apr 19
1
Xapian::Database->close() for perl missing
I have a xapian-daemon, which can be queried via http. A background-process generated every hour one new index and then remove and create a new symlink to the current database. /path/to/index/20120419010000 /path/to/index/20120419020000 /path/to/index/20120419030000 /path/to/index/default => /path/to/index/20120419030000 So the daemon only check the mtime of /path/to/index/default/iamchert