Group
Extension

Matches 5

Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr/JSON.pm ( view source; MetaCPAN )
Solr::JSON;{
our $VERSION = '1.11';
}

use base 'Apache::Solr';

use warnings;
use strict;

use Log::Report          qw(solr);

use Apache::Solr::Result ();
use HTTP::Request        ();
use JSON      
;
	$args->{format}   ||= 'JSON';
	$self->SUPER::init($args);

	$self->{ASJ_json} = $args->{json} || JSON->new->utf8;
	$self;
}

#---------------

sub json() {shift->{ASJ_json}}

#---------------------
point, core => $self);
	$self->request($endpoint, $result);

	if(my $dec = $result->decoded)
	{	# JSON uses different names!
		my $r = $dec->{result} = delete $dec->{response};
		$r->{doc} = delete $r
Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr/JSON.pod ( view source; MetaCPAN )
1 NAME

Apache::Solr::JSON - Apache Solr (Lucene) client via JSON

=head1 INHERITANCE

 Apache::Solr::JSON
   is an Apache::Solr

=head1 SYNOPSIS

  my $solr = Apache::Solr::JSON->new(...);
  my $solr
(format => 'JSON', ...);

=head1 DESCRIPTION

Implement the Solr client, where the communication is in JSON.

Both the requests and the responses are using JSON syntax, produced by
the JSON distributi
on (which defaults to JSON::XS when installed)

B<Warning 1:>
Apparently, Perl's JSON implementation does not support the repetition
of keys in one list, but Solr is using that.  Care is taken to avoi
Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr.pm ( view source; MetaCPAN )
 eq __PACKAGE__)
	{	my $format = delete $args{format} || 'XML';
		$format eq 'XML' || $format eq 'JSON'
			or panic "unknown communication format '$format' for solr";
		$class .= '::' . $format;
		eva
;
	}
	@which or return;

	# JSON calls do not accept multiple ids at once (it seems in 4.0)
	my $result;
	if($self->serverVersion ge '1.4' && !$self->isa('Apache::Solr::JSON'))
	{	$result = $self->_de
Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr/XML.pod ( view source; MetaCPAN )
=> LWP::UserAgent object

=item autocommit => BOOLEAN

=item core => NAME

=item format => 'XML'|'JSON'

=item retry_max => COUNT

=item retry_wait => SECONDS

=item server => URL

=item server_versio
Apache-Solr ( M/MA/MARKOV/Apache-Solr-1.11.tar.gz, MARKOV, 2025; MetaCPAN )
Apache-Solr/lib/Apache/Solr.pod ( view source; MetaCPAN )
Apache Solr (Lucene) extension

=head1 INHERITANCE

 Apache::Solr is extended by
   Apache::Solr::JSON
   Apache::Solr::XML

=head1 SYNOPSIS

  # use Log::Report mode => "DEBUG";
  my $solr    = Apach
m format => 'XML'|'JSON'

Communication format between client and server.  You may also instantiate
L<Apache::Solr::XML|Apache::Solr::XML> or L<Apache::Solr::JSON|Apache::Solr::JSON> directly.

=item 
 * flexible logging framework (Log::Report)

=item * both-way XML or both-way JSON, not requests in XML and answers in JSON

=item * access to plugings like terms and tika

=item * no Moose

=back

=h

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.