search for: db_create_or_open

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

2014 Jan 27
4
Perl Search::Xapian
Hi, Trying to learn Search::Xapian and be better at perl at the same time, I'm stuck, at the DB_CREATE_OR_OPEN error. Perl says this: ~/dev/sandbox/Xapian-perl$ ./Index1-Xap.pl 100-objects-v1.csv db "db" is not exported by the Search::Xapian module Can't continue after import errors at ./Index1-Xap.pl line 7. BEGIN failed--compilation aborted at ./Index1-Xap.pl line 7. What I did was try to...
2016 Feb 22
3
Database left unlocked by Tcl bindings
...; (https://notmuchmail.org/), which uses Xapian, that flintlock was not > > being locked (I had lost updates). > > It seems to work for me, testing with this: > > package require Tcl 8 > package require xapian 1.0.0 > xapian::WritableDatabase db "tmp.db" $xapian::DB_CREATE_OR_OPEN > xapian::WritableDatabase db2 "tmp.db" $xapian::DB_CREATE_OR_OPEN eric at bruno [ ~ ]$ cat /proc/version Linux version 3.13.300 (root at bruno) (gcc version 4.8.2 (GCC) ) #2 SMP Tue Sep 16 21:01:43 BST 2014 eric at bruno [ ~ ]$ tclsh % info patchlevel 8.6.1 % package require Tcl 8 8...
2016 Feb 21
5
Database left unlocked by Tcl bindings
I discovered, while trying to set up Tcl bindings for Notmuch (https://notmuchmail.org/), which uses Xapian, that flintlock was not being locked (I had lost updates). I then found that opening a Xapian database for writing directly via the Xapian Tcl bindings also silently fails to lock flintlock. I have taken a copy of flint_lock.cc to play with, and I find that it locks the file when called
2016 Feb 24
4
Database left unlocked by Tcl bindings
...lintlock was not >>>> being locked (I had lost updates). >>> >>> It seems to work for me, testing with this: >>> >>> package require Tcl 8 >>> package require xapian 1.0.0 >>> xapian::WritableDatabase db "tmp.db" $xapian::DB_CREATE_OR_OPEN >>> xapian::WritableDatabase db2 "tmp.db" $xapian::DB_CREATE_OR_OPEN >> >> >> eric at bruno [ ~ ]$ cat /proc/version >> Linux version 3.13.300 (root at bruno) (gcc version 4.8.2 (GCC) ) #2 SMP >> Tue Sep 16 21:01:43 BST 2014 >> eric at bruno...
2016 Feb 24
0
Database left unlocked by Tcl bindings
...uses Xapian, that flintlock was not > > > being locked (I had lost updates). > > > > It seems to work for me, testing with this: > > > > package require Tcl 8 > > package require xapian 1.0.0 > > xapian::WritableDatabase db "tmp.db" $xapian::DB_CREATE_OR_OPEN > > xapian::WritableDatabase db2 "tmp.db" $xapian::DB_CREATE_OR_OPEN > > > eric at bruno [ ~ ]$ cat /proc/version > Linux version 3.13.300 (root at bruno) (gcc version 4.8.2 (GCC) ) #2 SMP > Tue Sep 16 21:01:43 BST 2014 > eric at bruno [ ~ ]$ tclsh > % info pa...
2006 Aug 03
1
An error while testing Python 2.5 and xapian in Win32
...icense" for more information. >>> >>>import sys >>>sys.path.append("C:/Python25/Lib/site-packages/Xapian") >>>from _xapian import * >>>from _xapian import new_WritableDatabase, new_Document >>>w=new_WritableDatabase("db",DB_CREATE_OR_OPEN) >>>d=new_Document() >>>del d swig/python detected a memory leak of type 'Xapian::Document *', no destructor found. >>> If a try to print d, windows crashes indicating: Faulting application python.exe, version 0.0.0.0, faulting module ntdll.dll, version 5.1.2600...
2007 Dec 17
1
Crashes with spelling enabled and perl.
Hi Guys, Here's a simple test case that causes a segfault with the perl bindings patched to enable spelling correction: use strict; use warnings; use Search::Xapian; my $db = Search::Xapian::WritableDatabase->new("test.db", Search::Xapian::DB_CREATE_OR_OPEN); if (!defined($db)) { die("Failed to open xapian_database: $!"); } my $indexer = Search::Xapian::TermGenerator->new(); $indexer->set_flags(Search::Xapian::FLAG_SPELLING); my $document = Search::Xapian::Document->new(); $indexer->set_document($document); $indexer->i...
2016 Feb 21
0
Database left unlocked by Tcl bindings
...set up Tcl bindings for Notmuch > (https://notmuchmail.org/), which uses Xapian, that flintlock was not > being locked (I had lost updates). It seems to work for me, testing with this: package require Tcl 8 package require xapian 1.0.0 xapian::WritableDatabase db "tmp.db" $xapian::DB_CREATE_OR_OPEN xapian::WritableDatabase db2 "tmp.db" $xapian::DB_CREATE_OR_OPEN I wonder if the problem is unrelated to locking, but instead it's that the Tcl database doesn't get explicitly destroyed in your script, so that the C++ object doesn't either, and the changes don't get commi...
2016 Feb 25
0
Database left unlocked by Tcl bindings
...ly yet - the above isn't exactly equivalent to the Tcl code, as the two databases are created by the same process in Tcl but different processes with simpleindex. Could you try this C++ version: #include <xapian.h> int main() { Xapian::WritableDatabase db("tmp.db", Xapian::DB_CREATE_OR_OPEN); Xapian::WritableDatabase db2("tmp.db", Xapian::DB_CREATE_OR_OPEN); } Compile with: g++ -O2 `xapian-config --cxxflags --libs` doubleopen.cc And then run: ./a.out If locking is working, this should fail (and does for me) like so: terminate called after throwing an instance of ...
2008 Apr 20
1
Exception DatabaseCorruptError under php
...ndred of gigabytes free) and swap disks, just in case. This process runs alone: there aren't any other process writting nor reading xapian database; and I've instantiated Xapian object using xapian-bindings with: objXapian = new XapianWritableDatabase( "/var/lib/xapian/trade.ar", DB_CREATE_OR_OPEN ); Actually, /var/lib/xapian/trade.ar/ is an empty directory. Where else can I check? Thank you, Sebastian
2012 Jul 26
2
ruby bindings, ruby 1.9.3 and xapian
Hello, I've problem with xapian or sth. Ubuntu 8.04, ruby 1.9.3 with rvm, when Im trying to initialize database, Im getting this error: irb > require 'xapian' ==> true irb > database = Xapian::WritableDatabase.new('/full_path/db/xapian_db/development', Xapian::DB_CREATE_OR_OPEN) ArgumentError: Wrong arguments for overloaded method 'WritableDatabase.new'. Possible C/C++ prototypes are: WritableDatabase.new() WritableDatabase.new(std::string const &path, int action) WritableDatabase.new(Xapian::WritableDatabase const &other) from (irb):2...
2008 Sep 27
3
Query::MatchAll
Why there still been rank when using Query::MatchAll() ?
2016 Feb 25
2
Database left unlocked by Tcl bindings
...different processes with simpleindex. but the same problem happens from two different Tcl processes - both succeed because there is no lock. > Could you try this C++ version: > > #include <xapian.h> > int main() { > Xapian::WritableDatabase db("tmp.db", Xapian::DB_CREATE_OR_OPEN); > Xapian::WritableDatabase db2("tmp.db", Xapian::DB_CREATE_OR_OPEN); > } > > Compile with: > > g++ -O2 `xapian-config --cxxflags --libs` doubleopen.cc > > And then run: > > ./a.out > > If locking is working, this should fail (and does for me)...
2005 Jul 15
2
Problem with Perl bindings (enquire)
...ase->new("/foo/bar/"); $enq = $db->enquire("XIDblub"); the same doesn't seem to be possible with a database opened in read-write mode: $db = Search::Xapian::WritableDatabase->new("/foo/bar/", Search::Xapian::DB_CREATE_OR_OPEN); $enq = $db->enquire("XIDblub"); I first thought that this would be caused by a missing wrapper in Search::Xapian::WritableDatabase but when i duplicate the code from Search::Xapian::Database i get the following error: Search::Xapian::Enquire::new() -- databases is not a "...
2007 Dec 29
3
Term-Flags
Hi, Is it necessary to set the down below flag to the TermGenerator, if I want the "Did you mean ..." spelling corrections? Xapian::TermGenerator::flags::FLAG_SPELLING Thank you very much Markus
2011 Jan 17
2
DatabaseCorruptError
Hi there, My web app uses Xapian via the PHP bindings. I'm getting this error thrown occasionally when atempting to instantiate a XapianDatabase object for searching. DatabaseCorruptError: Expected block 107 to be level 1, not 0 Here's the line that invokes it: $database = new XapianDatabase(PROJROOT.'/data/xapian/posts'); And my version is xapian-core 1.2.3 with matchspy.
2012 Nov 21
1
about index speed of xapian
...| 111115151. the recored size is 10000000. the XAPIAN_FLUSH_THRESHOLD set 1000000. it takes 1026544ms to index the file, it is more slower than lucene. The lucene speed is about 40000 records per second. code: try { Xapian::WritableDatabase database("testindex", Xapian::DB_CREATE_OR_OPEN); mybase::Timeval now; std::string line; while (getline(fin, line)) { int pos = line.find('|'); if (pos != std::string::npos) { std::string imsi = line.substr(0, pos); std::string msisdn...
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
2013 Sep 22
2
How to filter search result with query with has white space.
Hello, include <iostream>#include <string>#include <xapian.h>struct document{ std::string title; std::string content; std::string url;}; void indexData(document d) { try { Xapian::WritableDatabase db("/Users/ramesh/Desktop/xapian", Xapian::DB_CREATE_OR_OPEN); Xapian::TermGenerator indexer; Xapian::Stem stemmer("english"); indexer.set_stemmer(stemmer); Xapian::Document doc; doc.set_data(d.title); indexer.set_document(doc); indexer.index_text(d.title,1,"title"); indexer....
2013 Sep 22
2
How to filter search result with query with has white space.
Hello, include <iostream>#include <string>#include <xapian.h>struct document{ std::string title; std::string content; std::string url;}; void indexData(document d) { try { Xapian::WritableDatabase db("/Users/ramesh/Desktop/xapian", Xapian::DB_CREATE_OR_OPEN); Xapian::TermGenerator indexer; Xapian::Stem stemmer("english"); indexer.set_stemmer(stemmer); Xapian::Document doc; doc.set_data(d.title); indexer.set_document(doc); indexer.index_text(d.title,1,"title"); indexer....