Skip Menu |

This queue is for tickets about the Search-Xapian CPAN distribution.

Maintainer(s)' notes

Important note

Do NOT report bugs here - if you do, your report won't be read by anybody. We've asked for this tracker to simply be disabled, but apparently that's not possible at present. So if you have a package on CPAN, you get a RT tracker whether you like it or not.

Instead, report bugs in the Xapian bug tracker.





























































































































































































































































































































































































































































































































































Report information
The Basics
Id: 15319
Status: resolved
Priority: 0/
Queue: Search-Xapian

People
Owner: Nobody in particular
Requestors: bsmith [...] cpan.org
Cc: KILINRAX [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.9.2.2
Fixed in: 0.9.2.3



Subject: Patch to clean up POD, and add new_term to Search::Xapian::Query
CC: kilinrax [...] cpan.org
In a few places modules advertise the wrong name in the POD, the patch fixes this. Search::Xapian::Query currently doesn't have a way to access the wqf and pos parameters to a Query object representing a term. new_term takes a term, the wqf, and pos. The XS function implementing this is new1weight. The patch also contains: * a fix to the package statement in BoolWeight.pm. * removed useless prototypes in Search::Xapian::Query. * some extraneous blank lines removed (from >1 lines to just 1 line)
Only in Search-Xapian-0.9.2.2-bsmith/: blib Only in Search-Xapian-0.9.2.2-bsmith/: Makefile Only in Search-Xapian-0.9.2.2-bsmith/: pm_to_blib Only in Search-Xapian-0.9.2.2-bsmith/: testdb Only in Search-Xapian-0.9.2.2-bsmith/: testdb-exception diff -ur Search-Xapian-0.9.2.2/Xapian/BoolWeight.pm Search-Xapian-0.9.2.2-bsmith/Xapian/BoolWeight.pm --- Search-Xapian-0.9.2.2/Xapian/BoolWeight.pm 2005-09-06 16:38:07.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/Xapian/BoolWeight.pm 2005-10-22 13:27:31.000000000 +0100 @@ -1,4 +1,4 @@ -package Search::Xapian::BM25; +package Search::Xapian::BoolWeight; use 5.006; use strict; Only in Search-Xapian-0.9.2.2-bsmith/Xapian: BoolWeight.pm~ diff -ur Search-Xapian-0.9.2.2/Xapian/Database.pm Search-Xapian-0.9.2.2-bsmith/Xapian/Database.pm --- Search-Xapian-0.9.2.2/Xapian/Database.pm 2005-09-06 16:38:07.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/Xapian/Database.pm 2005-10-22 13:28:04.000000000 +0100 @@ -23,12 +23,12 @@ =head1 NAME -Xapian::Search::Database - Search database object +Search::Xapian::Database - Search database object =head1 DESCRIPTION This class represents a Xapian database for searching. See -L<Xapian::WriteableDatabase> for an object suitable for indexing. +L<Search::Xapian::WriteableDatabase> for an object suitable for indexing. To perform searches, this class works with the L<Search::Xapian::Query> object. Only in Search-Xapian-0.9.2.2-bsmith/Xapian: Database.pm~ diff -ur Search-Xapian-0.9.2.2/Xapian/Document.pm Search-Xapian-0.9.2.2-bsmith/Xapian/Document.pm --- Search-Xapian-0.9.2.2/Xapian/Document.pm 2005-09-06 16:38:07.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/Xapian/Document.pm 2005-10-22 13:28:27.000000000 +0100 @@ -21,7 +21,7 @@ =head1 NAME -Xapian::Search::Database - Search database object +Search::Xapian::Document - Search database object =head1 DESCRIPTION Only in Search-Xapian-0.9.2.2-bsmith/Xapian: Document.pm~ Only in Search-Xapian-0.9.2.2-bsmith/Xapian: Enquire.pm~ diff -ur Search-Xapian-0.9.2.2/Xapian/PositionIterator.pm Search-Xapian-0.9.2.2-bsmith/Xapian/PositionIterator.pm --- Search-Xapian-0.9.2.2/Xapian/PositionIterator.pm 2005-09-06 16:38:07.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/Xapian/PositionIterator.pm 2005-10-22 13:28:52.000000000 +0100 @@ -23,7 +23,6 @@ Search::Xapian::PositionIterator - Iterate over sets of positions. - =head1 DESCRIPTION This iterator represents a stream of positions for a term. It overloads Only in Search-Xapian-0.9.2.2-bsmith/Xapian: PositionIterator.pm~ diff -ur Search-Xapian-0.9.2.2/Xapian/PostingIterator.pm Search-Xapian-0.9.2.2-bsmith/Xapian/PostingIterator.pm --- Search-Xapian-0.9.2.2/Xapian/PostingIterator.pm 2005-09-06 16:38:07.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/Xapian/PostingIterator.pm 2005-10-22 13:28:57.000000000 +0100 @@ -23,7 +23,6 @@ Search::Xapian::PostingIterator - Iterate over sets of documents. - =head1 DESCRIPTION This object represents a stream of results for a term. It overloads ++ for Only in Search-Xapian-0.9.2.2-bsmith/Xapian: PostingIterator.pm~ Only in Search-Xapian-0.9.2.2-bsmith/Xapian: QueryParser.pm~ diff -ur Search-Xapian-0.9.2.2/Xapian/Query.pm Search-Xapian-0.9.2.2-bsmith/Xapian/Query.pm --- Search-Xapian-0.9.2.2/Xapian/Query.pm 2005-09-06 16:35:42.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/Xapian/Query.pm 2005-10-22 13:35:39.000000000 +0100 @@ -26,7 +26,7 @@ '""' => sub { $_[0]->get_description() }, # FIXME: perhaps unwise? 'fallback' => 1; -sub clone() { +sub clone { my $self = shift; my $class = ref( $self ); my $copy = new2( $self ); @@ -34,7 +34,7 @@ return $copy; } -sub new() { +sub new { my $class = shift; my $query; my $invalid_args; @@ -81,6 +81,23 @@ return $query; } +sub new_term { + my $class = shift; + my $query; + + if (@_ < 1 or @_ > 3) { + Carp::carp( "new_term takes 1, 2 or 3 arguments only" ); + } + my ($term, $wqf, $pos) = @_; + $wqf = 1 unless defined $wqf; + $pos = 0 unless defined $pos; + + $query = new1weight($term, $wqf, $pos); + + bless $query, $class; + return $query; +} + sub _all_equal { my $first = shift; while(@_) { Only in Search-Xapian-0.9.2.2-bsmith/Xapian: Query.pm~ diff -ur Search-Xapian-0.9.2.2/Xapian/TermIterator.pm Search-Xapian-0.9.2.2-bsmith/Xapian/TermIterator.pm --- Search-Xapian-0.9.2.2/Xapian/TermIterator.pm 2005-09-06 16:38:07.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/Xapian/TermIterator.pm 2005-10-22 13:29:15.000000000 +0100 @@ -23,7 +23,6 @@ Search::Xapian::TermIterator - Iterate over sets of terms. - =head1 DESCRIPTION This object represents a stream of terms. It overloads ++ for Only in Search-Xapian-0.9.2.2-bsmith/Xapian: TermIterator.pm~ Only in Search-Xapian-0.9.2.2-bsmith/Xapian: ValueIterator.pm~ Only in Search-Xapian-0.9.2.2-bsmith/Xapian: Weight.pm~ Only in Search-Xapian-0.9.2.2-bsmith/Xapian: WritableDatabase.pm~ Only in Search-Xapian-0.9.2.2-bsmith/: Xapian.c Only in Search-Xapian-0.9.2.2-bsmith/: Xapian.o diff -ur Search-Xapian-0.9.2.2/XS/Query.xs Search-Xapian-0.9.2.2-bsmith/XS/Query.xs --- Search-Xapian-0.9.2.2/XS/Query.xs 2005-09-06 16:35:42.000000000 +0100 +++ Search-Xapian-0.9.2.2-bsmith/XS/Query.xs 2005-10-22 13:36:55.000000000 +0100 @@ -11,6 +11,16 @@ RETVAL Query * +new1weight(term, wqf, pos); + string term + termcount wqf + termpos pos + CODE: + RETVAL = new Query(term, wqf, pos); + OUTPUT: + RETVAL + +Query * new2sv(op, subq); int op string subq Only in Search-Xapian-0.9.2.2-bsmith/XS: Query.xs~
From: KILINRAX [...] cpan.org
Sorry, I should have responded to this (much) earlier. The patch made it's way into Search::Xapian 0.9.2.3, uploaded on 17 February 2006. FYI, an even more recent version has just been uploaded (0.9.6.0).