search for: get_docid

Displaying 20 results from an estimated 21 matches for "get_docid".

2012 Jan 20
3
get_docid???
my $mset = $enq->get_mset($nstart,$nrecords); for(my $mit=$mset->begin(); $mit != $mset->end();$mit++) { my $doc = $mit->get_document(); my $dat = $doc->get_data(); my $id = $doc->get_docid(); } [Fri Jan 20 10:35:06 2012] newmail.cgi: Can't locate auto/Search/Xapian/Document/get_docid.al in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl...
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 end of a postlist? The above code now appears to segfault at get_docid, presumably because we went...
2007 Sep 30
1
Perl example of using termitrator?
...ng similar. However when I attempt to translate that into perl, I am trying:( I am working in the blind here) foreach my $match ( @matches ) { my %hit; my %ht; my $doc = $match->get_document(); my $per = $match->get_percent(); my $id = $match->get_docid(); my $bterm = $enq->get_matching_terms_begin($id); for(my $xit=$bterm;$xit != $enq->get_matching_terms_end($id);$xit++) { my $term=$xit; print $term; } Which doesn't really make any sense. Xit is a string and I don't see how increme...
2013 Feb 05
0
make error in xapian-application/omega (jiangwen jiang)
...in which the reids are encountered during > > indexing, this may be slower to index, but it will save time when > > searching - probably a lot if you're asking for a lot of results. > > > > You can get an idea of how much difference this would make by calling > > i.get_docid() instead of the first two lines in this loop and timing > > that. > > calling i.get_docid() will help a lot! > > I will try to index for making reids = docid all the time. > > Best, > > De Lin > > > > ------------------------------ > > Message: 2 &gt...
2013 Jan 17
1
FASTER Search
...istTable::get_doclength(unsigned int, Xapian::Internal::RefCntPtr<ChertDatabase const>) const 5402 2.0023 ChertPostList::jump_to(unsigned int) 4518 1.6746 ChertPostList::skip_to(unsigned int, double) 4341 1.6090 ChertPostList::next_in_chunk() 4207 1.5594 ChertPostList::get_docid() const 4065 1.5067 ChertPostList::at_end() const 3988 1.4782 AndMaybePostList::at_end() const 3899 1.4452 OrPostList::get_docid() const 3655 1.3548 MultiMatch::get_mset(unsigned int, unsigned int, unsigned int, Xapian::MSet&, Xapian::Weight::Internal const&, Xapian:...
2006 Jan 31
1
retrieving attributes of searchresults
...ian::Query->new(OP_AND,@srch); my $enq = $db->enquire($q); my $mset = $enq->get_mset(0,999); my @matches; tie(@matches, 'Search::Xapian::MSet::Tied', $mset); foreach my $match (@matches) { my $doc = $match->get_document(); printf "ID %d %d%% [ %s ]\n", $match->get_docid(), $match->get_percent(), $doc->get_data(); } warn scalar @matches; ------------>8-------------------------------------------------------
2007 Feb 02
1
Working demo of search engine using boolean query.
...gt;matches(1, 100000000); print "Total: $total results found.\n------------------------\n"; my @matches = $enq->matches(0, 15); #------------------------------------------------------------------------------# foreach my $match ( @matches ) { printf "ID %d %d%%", $match->get_docid(), $match->get_percent(); my $doc = $match->get_document(); printf " [ %s ]", $doc->get_data(); print "\n"; } #------------------------------------------------------------------------------#
2009 Mar 02
0
Xapian, PHP bindings and
...>begin(); while ( ! $i->equals($matches->end())) { $n = $i->get_rank() + 1; $data = $i->get_document()->get_data(); echo "$n: {$i->get_percent()}% docid={$i->get_docid()} [$data]<br />"; echo "<br />\n\n"; $i->next(); } } catch (Exception $e) { print $e->getMessage() . "<br />\n"; exit(1); }...
2016 May 09
1
Given a document, how do you get its ID? (perl bindings)
I am writing an indexer that will crawl our web site. Following the recommendation here: https://trac.xapian.org/wiki/FAQ/UniqueIds I'm using the URL as the unique ID for each document. I see how to get a document from the xapian database if I know its URL, but what I need is also to be able to find out the URL from the document. Does this mean I need to store the URL in a value in
2013 Aug 21
2
Perl interface isn't working in 1.2.x
...ar ); my @matches = $enq->matches($nstart,$nrecords); my $mset = $enq->get_mset($nstart,$nrecords); my $est = $mset->get_matches_estimated(); my $totTime=0; foreach my $match ( @matches ) { my $doc = $match->get_document(); my $id = $match->get_docid(); my $eterm = $enq->get_matching_terms_end($id); my $bterm = $enq->get_matching_terms_begin($id); my @terms; for(my $xit=$bterm;$xit != $eterm;++$xit) { my $foo ="$xit"; $foo =~s/^Z//; $foo =~s/^A//;...
2013 Jun 19
2
Compact databases and removing stale records at the same time
On Wed, Jun 19, 2013, at 03:49 PM, Olly Betts wrote: > On Wed, Jun 19, 2013 at 01:29:16PM +1000, Bron Gondwana wrote: > > The advantage of compact - it runs approximately 8 times as fast (we > > are CPU limited in each case - writing to tmpfs first, then rsyncing > > to the destination) and it takes approximately 75% of the space of a > > fresh database with maximum
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
2007 Feb 09
1
PHP Binding and dbi2omega questions
...9;, $enq->get_matching_terms($mset->get_hit(0))); echo 'TERMS: '.$terms.'<br/>'; // Loop the matches and output some data.. for ($i = $mset->begin(); !$i->equals($mset->end()); $i->next()) { echo '<hr/> Document ID '.$i->get_docid().'<br/>'; echo $i->get_percent().'% <br/>'; $doc = $i->get_document(); echo $doc->get_data(); } ?> The echo $doc->get_data() output is as follows: content=blah blah blah id=1 title=My Title Is that data accessible via xapian...
2007 Jun 30
1
Re: [Xapian-commits] 9092: trunk/xapian-core/ trunk/xapian-core/api/ trunk/xapian-core/common/ trunk/xapian-core/include/xapian/
...te: > SVN root: svn://svn.xapian.org/xapian > Changes by: olly > Revision: 9092 > Date: 2007-06-30 15:16:16 +0100 (Sat, 30 Jun 2007) > > Log message (2 lines): > api/omdocument.cc,common/document.h,include/xapian/document.h: > Add Xapian::Document::get_docid() method. I was thinking that it would probably be useful to have a Xapian::Document::get_database_name() method, to allow the database that a document came from (in a multi-database situation) to be obtained. For a Flint database, this would return the path that was used to open the database....
2011 Apr 21
1
How to Retrieve content of the document?
...'%s'\n", $enq->get_query()->get_description(); my @matches = $enq->matches(0, 10); print scalar(@matches) . " results found\n"; foreach my $match ( @matches ) { my $doc = $match->get_document(); printf "ID %d %d%% [ %s ] \n", $match->get_docid(), $match->get_percent(), $doc->get_data(); } This returns to me 8 documents which I know is the correct answer becuase I have made a search engine which gives me the same results. The problem is i only get the document numbers(ids) but not the content. the $doc->get_data(); is supposed...
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.
2004 Dec 21
1
Search::Xapian add_database'd search results are odd?
...die("Error.\n"))); my $query = Search::Xapian::Query->new(OP_AND, 'word', 'word2'); print "Query: " . $query . "\n"; my $enq = $db->enquire($query); my @matches = $enq->matches(0,1000000); foreach my $match ( @matches ) { print $match->get_docid . ','; } =================================================================== If I don't use add_database, or add_database is wrapped in eval and fails due to me pointing to a xapian db that doesn't exist, and either query xapian db "-10" or "-11", I get docid...
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
2004 Oct 18
1
xapian-bindings compile creates 34mb xapian_wrap.o file?
Questions are threaded into the output: ******************** #./configure --without-python checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking
2020 Aug 23
2
MultiDatabase shard count limitations
...6 [.] sqlite3_step 0.03% perl perl [.] Perl_newOP 0.03% script/public-i libz.so.1.2.11 [.] 0x000000000000353b 0.03% script/public-i libz.so.1.2.11 [.] 0x000000000000f562 0.03% script/public-i libxapian.so.30.8.0 [.] GlassPostList::get_docid 0.03% script/public-i perl [.] Perl_sv_len 0.03% script/public-i libxapian.so.30.8.0 [.] Xapian::Weight::Internal::accumulate_stats 0.03% /mnt/btr/public perl [.] Perl_sv_catpvn_flags 0.03% /mnt/btr/public perl [.] memmove...