<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Fun with WebService::Solr, Part I of III	</title>
	<atom:link href="./index.html" rel="self" type="application/rss+xml" />
	<link>./../index.html</link>
	<description>Artist- and Librarian-At-Large</description>
	<lastBuildDate>
	Sat, 04 Jun 2016 18:04:58 +0000	</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.1.8</generator>
			<item>
				<title>
				By: dave				</title>
				<link>./../comment-page-1/index.html#comment-1654</link>
		<dc:creator><![CDATA[dave]]></dc:creator>
		<pubDate>Wed, 07 Apr 2010 06:14:48 +0000</pubDate>
		<guid isPermaLink="false">./../../../../index.html?p=118#comment-1654</guid>
					<description><![CDATA[Hi there,

I can&#039;t figure out this error. Can you help? I didn&#039;t get any error on install of WebService::Solr.

Thanks
 

 ./trivial-search.pl Hello
Apr 6, 2010 11:09:40 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select params={wt=json&#038;q=Hello} hits=2 status=0 QTime=1 
Could not parse JSON response: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before &quot;\n\n&#060;met...&#034;) at /usr/lib/perl5/site_perl/5.8.8/WebService/Solr/Response.pm line 42.
 


Error 400 

HTTP ERROR: 400undefined field name
RequestURI=/solr/select&lt;i&gt;&lt;a href=&quot;http://jetty.mortbay.org/&quot; rel=&quot;nofollow&quot;&gt;Powered by Jetty://&lt;/a&gt;&lt;/i&gt;]]></description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I can&#8217;t figure out this error. Can you help? I didn&#8217;t get any error on install of WebService::Solr.</p>
<p>Thanks</p>
<p> ./trivial-search.pl Hello<br />
Apr 6, 2010 11:09:40 PM org.apache.solr.core.SolrCore execute<br />
INFO: [] webapp=/solr path=/select params={wt=json&amp;q=Hello} hits=2 status=0 QTime=1<br />
Could not parse JSON response: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before &#8220;\n\n&lt;met&#8230;&quot;) at /usr/lib/perl5/site_perl/5.8.8/WebService/Solr/Response.pm line 42.</p>
<p>Error 400 </p>
<p>HTTP ERROR: 400undefined field name<br />
RequestURI=/solr/select<i><a href="http://jetty.mortbay.org/" rel="nofollow">Powered by Jetty://</a></i></p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Infomotions Mini-Musings &#187; Blog Archive &#187; Indexing and searching the Alex Catalogue / Eric Lease Morgan				</title>
				<link>./../comment-page-1/index.html#comment-1165</link>
		<dc:creator><![CDATA[Infomotions Mini-Musings &#187; Blog Archive &#187; Indexing and searching the Alex Catalogue / Eric Lease Morgan]]></dc:creator>
		<pubDate>Tue, 18 Aug 2009 01:24:04 +0000</pubDate>
		<guid isPermaLink="false">./../../../../index.html?p=118#comment-1165</guid>
					<description><![CDATA[[...] well, and interfacing with it was made much simpler through the use of a set of Perl modules called WebService::Solr. On the other hand, there are many ways the index could be improved such as implementing [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] well, and interfacing with it was made much simpler through the use of a set of Perl modules called WebService::Solr. On the other hand, there are many ways the index could be improved such as implementing [&#8230;]</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Eric Lease Morgan				</title>
				<link>./../comment-page-1/index.html#comment-842</link>
		<dc:creator><![CDATA[Eric Lease Morgan]]></dc:creator>
		<pubDate>Fri, 23 Jan 2009 01:49:59 +0000</pubDate>
		<guid isPermaLink="false">./../../../../index.html?p=118#comment-842</guid>
					<description><![CDATA[The source code to Parts I, II, and III are available at ./../../../../wp-content/uploads/2009/01/fun-with-webservice-solr.tar.gz]]></description>
		<content:encoded><![CDATA[<p>The source code to Parts I, II, and III are available at <a href="./../../../../wp-content/uploads/2009/01/fun-with-webservice-solr.tar.gz" rel="nofollow">./../../../../wp-content/uploads/2009/01/fun-with-webservice-solr.tar.gz</a></p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Eric Lease Morgan				</title>
				<link>./../comment-page-1/index.html#comment-811</link>
		<dc:creator><![CDATA[Eric Lease Morgan]]></dc:creator>
		<pubDate>Sat, 10 Jan 2009 18:48:15 +0000</pubDate>
		<guid isPermaLink="false">./../../../../index.html?p=118#comment-811</guid>
					<description><![CDATA[&lt;p&gt;
The following is a comment from Brian Cassidy, a co-author of WebService::Solr. &quot;Re-printed&quot; with permission:
&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;
I just noticed your 1st of a series of articles on WebService::Solr. Looks great so far! :)
&lt;/p&gt;

&lt;p&gt;
Here are some comments about the code:
&lt;/p&gt;

&lt;p&gt;
In the first script, you could probably use the much simpler syntax for add() rather than then full-on OOP way with Document and Field objects:
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;my $id  = WebService::Solr::Field-&gt;new( id  =&gt; $index );
my $title = WebService::Solr::Field-&gt;new( title =&gt; $_ );
my $doc = WebService::Solr::Document-&gt;new;
$doc-&gt;add_fields(( $id, $title ));
$solr-&gt;add( $doc );
$solr-&gt;commit;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
could be as simple as:
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$solr-&gt;add( { id =&gt; $index, title =&gt; $_ } );&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;
The full object notation is available when you need it, but for simple docs, I wouldn&#039;t bother with it.
&lt;/p&gt;

&lt;p&gt;
Also, note that I&#039;ve left off the call to &lt;code&gt;commit()&lt;/code&gt;. WebService::Solr has an &quot;autocommit&quot; bit that is on by default, so, after operations that require a commit, it&#039;s already done for you.
&lt;/p&gt;

&lt;p&gt;
I should probably also mention that it would be more efficient to send multiple documents over the line rather than one at a time -- though this case wouldn&#039;t show much difference.
&lt;/p&gt;

&lt;p&gt;
In the searching script you write:
&lt;/p&gt;

&lt;p&gt;
&lt;code&gt;print &quot;Your search ($query) found &quot; . ( $#hits + 1 ) . &quot; document(s).\n\n&quot;;&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;
While this is true for this particular index, in reality
&lt;/p&gt;

&lt;p&gt;
&lt;code&gt;my @hits = $response-&gt;docs;&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;
only returns the documents attached to this particular response -- which could be, for example, 10 out of 100 actual results.
&lt;/p&gt;

&lt;p&gt;
The true number of matches can be found with the pager object:
&lt;/p&gt;

&lt;p&gt;
&lt;code&gt;$response-&gt;pager-&gt;total_entries&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;
Hopefully I&#039;m not giving you a bunch of details that you&#039;re already aware of -- If i am, I apologize.
&lt;/p&gt;

&lt;p&gt;
Anyway, I can&#039;t wait for the rest of the series! :)
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&quot;Thanks, Brian!&lt;/p&gt;]]></description>
		<content:encoded><![CDATA[<p>
The following is a comment from Brian Cassidy, a co-author of WebService::Solr. &#8220;Re-printed&#8221; with permission:
</p>
<blockquote>
<p>
I just noticed your 1st of a series of articles on WebService::Solr. Looks great so far! :)
</p>
<p>
Here are some comments about the code:
</p>
<p>
In the first script, you could probably use the much simpler syntax for add() rather than then full-on OOP way with Document and Field objects:
</p>
<pre><code>my $id  = WebService::Solr::Field->new( id  => $index );
my $title = WebService::Solr::Field->new( title => $_ );
my $doc = WebService::Solr::Document->new;
$doc->add_fields(( $id, $title ));
$solr->add( $doc );
$solr->commit;</code></pre>
<p>
could be as simple as:
</p>
<p><code>$solr->add( { id => $index, title => $_ } );</code></p>
<p>
The full object notation is available when you need it, but for simple docs, I wouldn&#8217;t bother with it.
</p>
<p>
Also, note that I&#8217;ve left off the call to <code>commit()</code>. WebService::Solr has an &#8220;autocommit&#8221; bit that is on by default, so, after operations that require a commit, it&#8217;s already done for you.
</p>
<p>
I should probably also mention that it would be more efficient to send multiple documents over the line rather than one at a time &#8212; though this case wouldn&#8217;t show much difference.
</p>
<p>
In the searching script you write:
</p>
<p>
<code>print "Your search ($query) found " . ( $#hits + 1 ) . " document(s).\n\n";</code>
</p>
<p>
While this is true for this particular index, in reality
</p>
<p>
<code>my @hits = $response->docs;</code>
</p>
<p>
only returns the documents attached to this particular response &#8212; which could be, for example, 10 out of 100 actual results.
</p>
<p>
The true number of matches can be found with the pager object:
</p>
<p>
<code>$response->pager->total_entries</code>
</p>
<p>
Hopefully I&#8217;m not giving you a bunch of details that you&#8217;re already aware of &#8212; If i am, I apologize.
</p>
<p>
Anyway, I can&#8217;t wait for the rest of the series! :)
</p>
</blockquote>
<p>&#8220;Thanks, Brian!</p>
]]></content:encoded>
						</item>
			</channel>
</rss>
