Skip Menu |

This queue is for tickets about the Apache-Solr CPAN distribution.

Report information
The Basics
Id: 124301
Status: rejected
Priority: 0/
Queue: Apache-Solr

People
Owner: Nobody in particular
Requestors: aswathy.santhosh [...] ejyothi.com
Cc:
AdminCc:

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



Subject: Bug in Apache::Solr while extracting document
Date: Fri, 2 Feb 2018 14:35:51 +0530
To: bug-Apache-Solr [...] rt.cpan.org
From: Aswathy Santhosh <aswathy.santhosh [...] ejyothi.com>
Hi, I tried to index documents using to Solr using Apache::Solr module. I could add the normal string fields and values. But I couldn't extract the document. The code I tried is as follows #!/usr/bin/perl use warnings; use strict; use Solr; use Apache::Solr; my $ua = 'LWP::UserAgent'->new; $ua->credentials("abc.****:8983", "realm", "user", "pass"); my $url = 'http://abc.****.com:8983/solr/OppsBot'; my $solr = Apache::Solr->new(server => $url, agent => $ua); my $doc = '/opt/solr/example/exampledocs/Opptydocs/Redacted_purchase_description_Microsoft_Premier_Support_Sowftware_PR__11073643.pdf' ; my $fh; open($fh, '<:encoding(UTF-8)', $doc) or die "Could not open file '$doc' $!"; my %options = ( file => $fh, literals => { id => 5} , literal_agency => 'abc', fmap_content => 'content', ); my $result = $solr->extractDocument(%options); $result or die $result->errors; The file is passed as a file handler. I tried with the option of filename also(filepath/filename.pdf). But that also didn't work. Please help me out whether I'm missing anything. My Perl version : 5.16 OS Used: GNU/Linux Thanks and Regards, Aswathy Santhosh
CC: ;
Subject: Re: [rt.cpan.org #124301] Bug in Apache::Solr while extracting document
Date: Fri, 2 Feb 2018 10:56:59 +0100
To: Aswathy Santhosh via RT <bug-Apache-Solr [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Aswathy Santhosh via RT (bug-Apache-Solr@rt.cpan.org) [180202 09:06]: Show quoted text
> Fri Feb 02 04:06:06 2018: Request 124301 was acted upon. > Transaction: Ticket created by aswathy.santhosh@ejyothi.com > Queue: Apache-Solr > Subject: Bug in Apache::Solr while extracting document > Requestors: aswathy.santhosh@ejyothi.com > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=124301 > > > I tried to index documents using to Solr using Apache::Solr module. > I could add the normal string fields and values. But I couldn't extract the > document.
RT is not for support requests, but for (at least semi confirmed) bugs. Please contact me via markov@cpan.org. my $result = $solr->extractDocument( file => $doc, literals => { id => 5} , literal_agency => 'abc', fmap_content => 'content', ); $result or die $result->errors; I haven't used this module for quite some time, but the regression test tells me that it should work like this. Show quoted text
> Please help me out whether I'm missing anything.
Well, for one: your report is missing an error messages. When you add "use Log::Report mode => 3;" at the top, you may get some more trace. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
user error