search for: xapiandocu

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

2008 Apr 20
1
Exception DatabaseCorruptError under php
...xception 'Exception' with message 'DatabaseCorruptError: Failed to unlink /var/lib/xapian/trade.ar/termlist.baseA: No such file or directory' in /usr/share/php5/xapian.php:1140 Stack trace: #0 /usr/share/php5/xapian.php(1140): writabledatabase_add_document(Resource id #18, Object(XapianDocument)) #1 /home/indexer/CDetails.php(431): XapianWritableDatabase->add_document(Object(XapianDocument)) #2 /home/indexer/CDetails.php(379): CDetails->postDetails('E', '2000-01-07', '001', '-1', '4', '200BA', '225', '19059000390...
2012 Feb 17
2
DatabaseModifiedError on get_data - best practice?
Hi, I have previously had a problem with getting this error on a get_mset call, and solved it by subclassing XapianEnquire with a backoff-and-retry algorithm (as suggested by this list, many thanks!). However, I now get it intermittently when calling get_data on a XapianDocument. The same solution doesn't seem to be quite as easy in this case, because: 1. The document is not instantiated by my code, it's returned from the Iterator, so I can't easily subclass it without editing the bindings. 2. The document doesn't have a reference to the database, so...
2007 May 15
1
Document ID 0 is invalid... but not always...
...metadata in a "special" record with docId "-1"... I know, this is bad, but what is interesting is what xapian does in such a situation... Here is a simple PHP test : $db=new XapianWritableDatabase('pathtodb', Xapian::DB_CREATE_OR_OVERWRITE); $doc=new XapianDocument(); $doc->set_data('metadata'); // waiting for http://www.xapian.org/cgi-bin/bugzilla/show_bug.cgi?id=143 $doc->add_term('metadata'); $db->replace_document(-1, $doc); // or 4294967295 = (2^32)-1 $doc=new XapianDocument(); $doc->set_data('dat...
2008 Jan 15
7
PHP indexing, what's the PHP method for indexscript
...ield=url sample : weight=1 index field=sample How can I create the same indexing using PHP? With this, I can get an searchable index, but I have no idea how to set the fields, so that I can actually GET something back (with the underneath code, I just get a bunch of pid's back). $doc = new XapianDocument(); $doc->set_data($postrow['pid']); $doc->add_value(1,date('Ymd',$postrow['postdate'])); $doc->add_value(2,$postrow['author_id']); $doc->add_term("XAUTHORID".$postrow["author_id"]); $doc->add_term("XAUTHORNAME&qu...
2010 Jun 09
1
TermGenerator incorrectly tokenizes German text which contains special characters
...d Zgesundheitssch? (stemmed). All character encodings are set to UTF-8, the MySql database is also in UTF-8 encoding. * #1 $lIndexer = new XapianTermGenerator(); #2 $lStemmer = new XapianStem(XapianHelper::GetStemmer($pLanguage)); // ?german? #3 $lIndexer->set_stemmer($lStemmer); #4 $lDoc = new XapianDocument(); #5 $lDoc->add_term($lObj->Id); #6 $lIndexer->set_document($lDoc); #7 $lIndexer->index_text("Nahrungserg?nzungsmittel Ausrei?er"); #8 $lIndexer->index_text($lSomeStringFromDb);* In the code example just above here the problem only occurs when I try to index text on l...
2011 Apr 19
0
How to locate the query term in search results?
Hi everyone, I'm trying to build a summary of each document within the search results, and the summary is supposed to be the sentence where the queried term appears in the document. However, I'm not sure about where to start. I mean, should I call the class of XapianDocument and search through the termlist of each document in the Mset or it'll be better if I begin with the positionlist of the term to get it located in each document? Any suggestion and clues are welcome! Much thanks! Best, Shen -------------- next part -------------- An HTML attac...
2008 Aug 19
1
Fwd: Strange error with PHP bindings [some more details]
Finally I noticed something suspect: [2008-08-19 09:11:25] [DEBUG] DAO_Articles::add_xindex() - document added id : 255, title : Gli anelli con sigil... this is a debug line from my application, add_xindex function simply adds the document to xapian database, the error always happens when I try to add an article with id = 255, this can not be a casualty (I also tried to change the order of