Displaying 16 results from an estimated 16 matches for "get_doccount".
2015 Mar 11
2
stub-file and get_doccount
Hello,
i switched from one big index to a stub file with many indexes and running
into a problem.
i have a tool to fetch a random document via:
get_doccount
random id up to get_doccount
get_document with that id
after changing to stub file this failes. Is there a nice way to get a
random document from a stub file?
?MfG?
Felix Ostmann
2010 Jun 24
1
Quickest way to retrieve data for a large match set?
...arches my generate 50 - 500 matches, but some return
more than 5000).
Code is something like:
...
print STDERR "Query = ", $q->get_description, "\n" if $self->debug;
my $e = $self->index->enquire ($q);
#my $hits = $e->get_mset(0, $self->index->get_doccount, $self->index-
>get_doccount);
my (@hits) = $e->matches (0, $self->index->get_doccount, $self->index-
>get_doccount);
my (@results) = map +thaw($_->get_document->get_data), @hits;
return \@results;
}
I'd like to know if there's anything I can do to im...
2007 Jul 24
1
Xapian::DocNotFoundError on replace_document? (Called from Search::Xapian)
Hello,
I'm using Xapian 1.0.2 (flint) and matching Search::Xapian.
I'm getting:
terminate called after throwing an instance of
'Xapian::DocNotFoundError', which dumps core.
at first it was after adding my 2nd document (to an empty db, although
I don't know if that has any bearing) to the database with a
replace_document() call.
I shifted the first document off the
2013 Jun 19
2
Compact databases and removing stale records at the same time
...from all the source databases */
Xapian::Database *srcdb = new Xapian::Database();
while (*sources) {
srcdb->add_database(Xapian::Database(*sources++));
}
Xapian::Enquire enquire(*srcdb);
enquire.set_query(Xapian::Query::MatchAll);
Xapian::MSet matches = enquire.get_mset(0, srcdb->get_doccount());
/* create a destination database */
Xapian::WritableDatabase *destdb = new Xapian::WritableDatabase(dest, Xapian::DB_CREATE_OR_OPEN);
destdb->begin_transaction();
/* copy all matching documents to the new DB */
for (Xapian::MSetIterator i = matches.begin() ; i != matches.end() ; ++i)...
2023 Aug 18
1
does Xapian::Enquire hold an MVCC revision?
On Thu, Aug 17, 2023 at 09:28:26PM +0000, Eric Wong wrote:
> In other words, is it possible to avoid duplicates if new
> documents are inserted into the DB by another process in-between
> ->get_mset calls when reusing Xapian::Enquire objects?
The Database object itself effectively does (it works in a snapshot of
the state of the database when you open it, or last called reopen()
which
2009 Apr 23
1
PHP Total document
I was also wondering if someone could tell me how to extract the total
number of documents contained in a database via PHP.
Thanks,
Frank
2013 Aug 27
2
What does collection_freq means?
Hi, all:
I am confused with the concept of colletion_freq
There's no informations about it on http://xapian.org/docs/glossary.html
What does it means?
Thanks
Regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20130827/370cc6a3/attachment.html>
2013 Aug 21
2
Perl interface isn't working in 1.2.x
At least it isn't working the way it used to.
Code:
$db = Search::Xapian::Database->new( $dx );
my $qp = Search::Xapian::QueryParser->new();
my $dbSize=$db->get_doccount();
# $qp->set_stemmer(new Search::Xapian::Stem("english"));
# $qp->set_stemming_strategy(STEM_SOME);
# $qp->set_default_op($defaultop);
my $par = $qp->parse_query($query);
my $enq = $db->enquire( $par );
my @matches = $enq->matches($nstart,$nreco...
2009 Feb 12
1
problem when using xapian's static libs in windows
...XZ)
libnet.lib(tcpclient.obj) : error LNK2001: ????????? "public: virtual void __thiscall RemoteDatabase::keep_alive(void)" (?keep_alive at RemoteDatabase@@UAEXXZ)
libbackend.lib(dbfactory_remote.obj) : error LNK2001: ????????? "public: virtual unsigned int __thiscall RemoteDatabase::get_doccount(void)const " (?get_doccount at RemoteDatabase@@UBEIXZ)
libnet.lib(progclient.obj) : error LNK2001: ????????? "public: virtual unsigned int __thiscall RemoteDatabase::get_doccount(void)const " (?get_doccount at RemoteDatabase@@UBEIXZ)
libnet.lib(tcpclient.obj) : error LNK2001: ???????...
2018 Nov 30
1
Xapian Benchmark results
...}
}
Xapian::Document doc;
doc.set_data(line_string);
indexer.set_document(doc);
indexer.index_text(line_string);
database.add_document(doc);
file.close();
}
database.commit();
cout <<"count::" <<database.get_doccount() <<endl;
}
catch (const Xapian::Error &e) {
cout << e.get_description() << endl;
exit(1);
}
}
int main(int argc, char **argv)
{
vector<thread> threads;
int doc_ct = 0;
char queries[][20] = {"Probation","Volleyball"...
2013 Aug 26
2
Perl interface isn't working in 1.2.x
On 08/25/2013 05:02 PM, Olly Betts wrote:
> So the simple fix is
> probably just to install the perl-Search-Xapian RPM instead.
Thanks, the Centos 6 repos don't have that rpm and the
http://xapian.org/download page seems to only cover the XS bindings, if
I am reading this correctly:
But I was able to remove the rpm packages and compile and install the
core and swig from source.
2009 Jul 23
1
tcp deamon and remote connection
Hi,
I'm trying to use xapian from php script with TCP daemon.
I started TCP daemon: xapian-tcpsrv --port 5050 --writable /path-to-db
When I trying to get access to it within my php-script with
remote_open_writable("localhost", 5050) or remote_open("localhost",
5050) apache fails with signal 11:
dev kernel: pid 35923 (httpd), uid 80: exited on signal 11
TCP demon also
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
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
2013 Jun 19
2
Compact databases and removing stale records at the same time
...called. I'll simplify it.
> > /* copy all matching documents to the new DB */
> > for (Xapian::MSetIterator i = matches.begin() ; i != matches.end() ; ++i) {
> > Xapian::Document doc = i.get_document();
>
> This requires creating an in-memory structure of size get_doccount(), so
> won't scale well to really big databases.
My test DB is about 90k documents. Lots of terms though, particularly some of the emails which contain thousands of lines of syslog output.
[brong at imap14 brong]$ delve -1 -a xapian.58 | wc -l
6370721
[brong at imap14 brong]$ delve -1 -V...
2006 Dec 06
1
Bug and patch for +terms with wildcards
...}
Index: matcher/localmatch.cc
===================================================================
--- matcher/localmatch.cc (revision 7552)
+++ matcher/localmatch.cc (working copy)
@@ -468,6 +468,12 @@
postlist_from_query(query->subqs[1], matcher, is_bool),
matcher,
db->get_doccount());
+ case Xapian::Query::OP_MATCH_NOTHING: {
+ Assert(query->subqs.size() == 0);
+ LeafPostList *pl = new EmptyPostList();
+ pl->set_termweight(new Xapian::BoolWeight());
+ RETURN(pl);
+ }
}
Assert(false);
RETURN(NULL);
Index:...