r34984 - in /branches/upstream/libwebservice-solr-perl/current: ./ inc/Module/ inc/Module/Install/ lib/WebService/
bricas-guest at users.alioth.debian.org
bricas-guest at users.alioth.debian.org
Fri May 8 12:28:34 UTC 2009
Author: bricas-guest
Date: Fri May 8 12:28:29 2009
New Revision: 34984
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34984
Log:
[svn-upgrade] Integrating new upstream version, libwebservice-solr-perl (0.06)
Modified:
branches/upstream/libwebservice-solr-perl/current/Changes
branches/upstream/libwebservice-solr-perl/current/META.yml
branches/upstream/libwebservice-solr-perl/current/Makefile.PL
branches/upstream/libwebservice-solr-perl/current/README
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install.pm
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Base.pm
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Can.pm
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Win32.pm
branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/libwebservice-solr-perl/current/lib/WebService/Solr.pm
Modified: branches/upstream/libwebservice-solr-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/Changes?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/Changes (original)
+++ branches/upstream/libwebservice-solr-perl/current/Changes Fri May 8 12:28:29 2009
@@ -1,4 +1,9 @@
Revision history for Perl extension WebService::Solr.
+
+0.06 Thu May 07 2009
+ - Add auto_suggest to hit the new Solr 1.4 /autoSuggest API (RT #45798)
+ - Refactor a basic GET request into its own public
+ method (generic_solr_request)
0.05 Mon Apr 13 2009
- Confess upon HTTP error (Leon Brocard)
Modified: branches/upstream/libwebservice-solr-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/META.yml?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/META.yml (original)
+++ branches/upstream/libwebservice-solr-perl/current/META.yml Fri May 8 12:28:29 2009
@@ -10,7 +10,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.82'
+generated_by: 'Module::Install version 0.87'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -30,4 +30,5 @@
perl: 5.8.0
resources:
license: http://dev.perl.org/licenses/
-version: 0.05
+ repository: http://github.com/bricas/webservice-solr
+version: 0.06
Modified: branches/upstream/libwebservice-solr-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/Makefile.PL?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/Makefile.PL (original)
+++ branches/upstream/libwebservice-solr-perl/current/Makefile.PL Fri May 8 12:28:29 2009
@@ -1,4 +1,4 @@
-use inc::Module::Install 0.77;
+use inc::Module::Install 0.87;
if( -e 'MANIFEST.SKIP' ) {
system( 'pod2text lib/WebService/Solr.pm > README' );
@@ -22,4 +22,6 @@
tests_recursive;
+repository 'http://github.com/bricas/webservice-solr';
+
WriteAll;
Modified: branches/upstream/libwebservice-solr-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/README?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/README (original)
+++ branches/upstream/libwebservice-solr-perl/current/README Fri May 8 12:28:29 2009
@@ -54,6 +54,11 @@
object. All key-value pairs supplied in "\%options" are serialzied in
the request URL.
+ auto_suggest( \%options )
+ Get suggestions from a list of terms for a given field. The Solr wiki
+ has more details about the available options
+ (http://wiki.apache.org/solr/TermsComponent)
+
commit( \%options )
Sends a commit command. Returns true on success, false otherwise. You
must do a commit after an add, update or delete. You can turn autocommit
@@ -79,6 +84,12 @@
ping( )
Sends a basic ping request. Returns true on success, false otherwise.
+ generic_solr_request( $path, \%query )
+ Performs a simple "GET" request appending $path to the base URL and
+ using key-value pairs from "\%query" to generate the query string. This
+ should allow you to access parts of the Solr API that don't yet have
+ their own correspodingly named function (e.g. "dataimport" ).
+
SEE ALSO
* http://lucene.apache.org/solr/
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install.pm Fri May 8 12:28:29 2009
@@ -28,7 +28,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.82';
+ $VERSION = '0.87';
# Storage for the pseudo-singleton
$MAIN = undef;
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Base.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Base.pm Fri May 8 12:28:29 2009
@@ -1,7 +1,11 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.82';
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = '0.87';
+}
# Suspend handler for "redefined" warnings
BEGIN {
@@ -12,7 +16,7 @@
### This is the ONLY module that shouldn't have strict on
# use strict;
-#line 41
+#line 45
sub new {
my ($class, %args) = @_;
@@ -27,7 +31,7 @@
bless( \%args, $class );
}
-#line 62
+#line 66
sub AUTOLOAD {
my $self = shift;
@@ -38,13 +42,13 @@
goto &$autoload;
}
-#line 79
+#line 83
sub _top {
$_[0]->{_top};
}
-#line 94
+#line 98
sub admin {
$_[0]->_top->{admin}
@@ -52,7 +56,7 @@
Module::Install::Base::FakeAdmin->new;
}
-#line 110
+#line 114
sub is_admin {
$_[0]->admin->VERSION;
@@ -63,6 +67,7 @@
package Module::Install::Base::FakeAdmin;
my $fake;
+
sub new {
$fake ||= bless(\@_, $_[0]);
}
@@ -78,4 +83,4 @@
1;
-#line 157
+#line 162
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Can.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Can.pm Fri May 8 12:28:29 2009
@@ -9,7 +9,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.82';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Fetch.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Fetch.pm Fri May 8 12:28:29 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.82';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Makefile.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Makefile.pm Fri May 8 12:28:29 2009
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.82';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Metadata.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Metadata.pm Fri May 8 12:28:29 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.82';
+ $VERSION = '0.87';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Win32.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/Win32.pm Fri May 8 12:28:29 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.82';
+ $VERSION = '0.87';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/WriteAll.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/inc/Module/Install/WriteAll.pm Fri May 8 12:28:29 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.82';
+ $VERSION = '0.87';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/libwebservice-solr-perl/current/lib/WebService/Solr.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwebservice-solr-perl/current/lib/WebService/Solr.pm?rev=34984&op=diff
==============================================================================
--- branches/upstream/libwebservice-solr-perl/current/lib/WebService/Solr.pm (original)
+++ branches/upstream/libwebservice-solr-perl/current/lib/WebService/Solr.pm Fri May 8 12:28:29 2009
@@ -28,7 +28,7 @@
default => sub { { wt => 'json' } }
);
-our $VERSION = '0.05';
+our $VERSION = '0.06';
sub BUILDARGS {
my ( $self, $url, $options ) = @_;
@@ -117,8 +117,18 @@
my ( $self, $query, $params ) = @_;
$params ||= {};
$params->{ 'q' } = $query;
+ return $self->generic_solr_request( 'select', $params );
+}
+
+sub auto_suggest {
+ shift->generic_solr_request( 'autoSuggest', @_ );
+}
+
+sub generic_solr_request {
+ my ( $self, $path, $params ) = @_;
+ $params ||= {};
my $response = WebService::Solr::Response->new(
- $self->agent->get( $self->_gen_url( 'select', $params ) ) );
+ $self->agent->get( $self->_gen_url( $path, $params ) ) );
return $response;
}
@@ -240,6 +250,11 @@
object. All key-value pairs supplied in C<\%options> are serialzied in the
request URL.
+=head2 auto_suggest( \%options )
+
+Get suggestions from a list of terms for a given field. The Solr wiki has
+more details about the available options (http://wiki.apache.org/solr/TermsComponent)
+
=head2 commit( \%options )
Sends a commit command. Returns true on success, false otherwise. You must do
@@ -272,6 +287,13 @@
Sends a basic ping request. Returns true on success, false otherwise.
+=head2 generic_solr_request( $path, \%query )
+
+Performs a simple C<GET> request appending C<$path> to the base URL
+and using key-value pairs from C<\%query> to generate the query string. This
+should allow you to access parts of the Solr API that don't yet have their
+own correspodingly named function (e.g. C<dataimport> ).
+
=head1 SEE ALSO
=over 4
More information about the Pkg-perl-cvs-commits
mailing list