<?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 III of III</title>
	<atom:link href="http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/feed/" rel="self" type="application/rss+xml" />
	<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/</link>
	<description>Thoughts on libraries and librarianship</description>
	<lastBuildDate>Thu, 15 Sep 2011 18:02:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: dave</title>
		<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/comment-page-1/#comment-2788</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Thu, 27 May 2010 04:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://infomotions.com/blog/?p=134#comment-2788</guid>
		<description><![CDATA[Hi Eric

Thanks for your inputs. However I still unable get to work. I tried both methods. Did it works for you?  My search found 0 document when I multiple fqs.

# build an array of facets
my @fqs = ( &#039;systype:LA&#039;, &#039;location:US&#039; );

# build the search options
my %search_options         = ();
$search_options{ &#039;start&#039; } = $start_record,
$search_options{ &#039;rows&#039; }  = $maximum_records;
$search_options{ &#039;fq&#039; }    = [ @fqs ];

# do the work; search
my $response = $solr-&gt;search( $query, \%search_options );]]></description>
		<content:encoded><![CDATA[<p>Hi Eric</p>
<p>Thanks for your inputs. However I still unable get to work. I tried both methods. Did it works for you?  My search found 0 document when I multiple fqs.</p>
<p># build an array of facets<br />
my @fqs = ( &#8216;systype:LA&#8217;, &#8216;location:US&#8217; );</p>
<p># build the search options<br />
my %search_options         = ();<br />
$search_options{ &#8216;start&#8217; } = $start_record,<br />
$search_options{ &#8216;rows&#8217; }  = $maximum_records;<br />
$search_options{ &#8216;fq&#8217; }    = [ @fqs ];</p>
<p># do the work; search<br />
my $response = $solr-&gt;search( $query, \%search_options );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Lease Morgan</title>
		<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/comment-page-1/#comment-1715</link>
		<dc:creator>Eric Lease Morgan</dc:creator>
		<pubDate>Thu, 20 May 2010 02:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://infomotions.com/blog/?p=134#comment-1715</guid>
		<description><![CDATA[Dave, I think are having problems for two reasons. First, since it is possible to specify multiple facets in a query, you need to associate the value of fq as a reference to an array. Second you need to pass the search option of your query as a reference to a hash. I think I learned these tricks from Brian Cassidy.

I had similar issues in my &lt;a href=&quot;http://infomotions.com/alex/&quot; rel=&quot;nofollow&quot;&gt;Alex Catalogue&lt;/a&gt;. Specifically, it is possible to enter a query, get a search result, and refine it through any number of facets (Solr fq values). To accommodate this functionality I wrote the following to build my Solr query:

&lt;pre&gt;# build the search options
my %search_options = ();
$search_options{ &#039;start&#039; }          = $start;
$search_options{ &#039;rows&#039; }           = ROWS;
$search_options{ &#039;facet&#039; }          = &#039;true&#039;;
$search_options{ &#039;facet.field&#039; }    = [ &#039;type&#039;, &#039;facet_creator&#039;, &#039;facet_subject&#039;, &#039;repository&#039; ];
$search_options{ &#039;facet.mincount&#039; } = MINCOUNT;
$search_options{ &#039;sort&#039; }           = $sort;
if ( $cgi-&gt;param( &#039;fq&#039; ) ) { $search_options{ &#039;fq&#039; } = [ $cgi-&gt;param( &#039;fq&#039;) ] };

# do the work; search
my $response = $solr-&gt;search( $query, \%search_options );&lt;/pre&gt;

Notice how $search_options{ &#039;fq&#039; } points to a reference to an array. And notice later how the search method includes a reference to %search_options.

Maybe the following will work for you:

&lt;pre&gt;# build an array of facets
my @fqs = ( &#039;systype:LA&#039;, &#039;location:US&#039; );

# build the search options
my %search_options         = ();
$search_options{ &#039;start&#039; } = $start_record,
$search_options{ &#039;rows&#039; }  = $maximum_records;
$search_options{ &#039;fq&#039; }    = [ @fqs ];

# do the work; search
my $response = $solr-&gt;search( $query, \%search_options );&lt;/pre&gt;

Good luck.]]></description>
		<content:encoded><![CDATA[<p>Dave, I think are having problems for two reasons. First, since it is possible to specify multiple facets in a query, you need to associate the value of fq as a reference to an array. Second you need to pass the search option of your query as a reference to a hash. I think I learned these tricks from Brian Cassidy.</p>
<p>I had similar issues in my <a href="http://infomotions.com/alex/" rel="nofollow">Alex Catalogue</a>. Specifically, it is possible to enter a query, get a search result, and refine it through any number of facets (Solr fq values). To accommodate this functionality I wrote the following to build my Solr query:</p>
<pre># build the search options
my %search_options = ();
$search_options{ 'start' }          = $start;
$search_options{ 'rows' }           = ROWS;
$search_options{ 'facet' }          = 'true';
$search_options{ 'facet.field' }    = [ 'type', 'facet_creator', 'facet_subject', 'repository' ];
$search_options{ 'facet.mincount' } = MINCOUNT;
$search_options{ 'sort' }           = $sort;
if ( $cgi->param( 'fq' ) ) { $search_options{ 'fq' } = [ $cgi->param( 'fq') ] };

# do the work; search
my $response = $solr->search( $query, \%search_options );</pre>
<p>Notice how $search_options{ &#8216;fq&#8217; } points to a reference to an array. And notice later how the search method includes a reference to %search_options.</p>
<p>Maybe the following will work for you:</p>
<pre># build an array of facets
my @fqs = ( 'systype:LA', 'location:US' );

# build the search options
my %search_options         = ();
$search_options{ 'start' } = $start_record,
$search_options{ 'rows' }  = $maximum_records;
$search_options{ 'fq' }    = [ @fqs ];

# do the work; search
my $response = $solr->search( $query, \%search_options );</pre>
<p>Good luck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dave</title>
		<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/comment-page-1/#comment-1706</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Thu, 13 May 2010 04:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://infomotions.com/blog/?p=134#comment-1706</guid>
		<description><![CDATA[Hi there,

On my previous post, I forgot the put multiple fq. Basic I want to do multiple fq on webservice::solr. Is that possible? If so can you give me some advise.

my $response = $solr-&gt;search( $query, {
’start’ =&gt; $start_record,
‘rows’ =&gt; $maximum_records ,
‘fq’ =&gt; ’systype:LA’,
&#039;fq&#039; =&gt; &#039;location:US&#039;
});


This code failed.]]></description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>On my previous post, I forgot the put multiple fq. Basic I want to do multiple fq on webservice::solr. Is that possible? If so can you give me some advise.</p>
<p>my $response = $solr-&gt;search( $query, {<br />
’start’ =&gt; $start_record,<br />
‘rows’ =&gt; $maximum_records ,<br />
‘fq’ =&gt; ’systype:LA’,<br />
&#8216;fq&#8217; =&gt; &#8216;location:US&#8217;<br />
});</p>
<p>This code failed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/comment-page-1/#comment-1703</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 10 May 2010 18:41:17 +0000</pubDate>
		<guid isPermaLink="false">http://infomotions.com/blog/?p=134#comment-1703</guid>
		<description><![CDATA[Hi there,

I have problem with solr fq (facet query). If I use q=system&amp;fq=systype:LA on SOLR admin page, it works.



I tried both of these methods using Webservice and it failed . Can you give some inputs to solve this problem.

Thanks

 my $response   = $solr-&gt;search( $query, {
                                  &#039;start&#039; =&gt; $start_record,
                                  &#039;rows&#039;  =&gt; $maximum_records ,
                                  &#039;fq&#039;    =&gt; &#039;systype:LA&#039;
});


my $response   = $solr-&gt;search( $query, {
                                  &#039;start&#039; =&gt; $start_record,
                                  &#039;rows&#039;  =&gt; $maximum_records ,
                                  &#039;facet.query&#039;    =&gt; &#039;systype&#039;,
                                  &#039;systype&#039;  =&gt; LA
});]]></description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I have problem with solr fq (facet query). If I use q=system&amp;fq=systype:LA on SOLR admin page, it works.</p>
<p>I tried both of these methods using Webservice and it failed . Can you give some inputs to solve this problem.</p>
<p>Thanks</p>
<p> my $response   = $solr-&gt;search( $query, {<br />
                                  &#8216;start&#8217; =&gt; $start_record,<br />
                                  &#8216;rows&#8217;  =&gt; $maximum_records ,<br />
                                  &#8216;fq&#8217;    =&gt; &#8216;systype:LA&#8217;<br />
});</p>
<p>my $response   = $solr-&gt;search( $query, {<br />
                                  &#8216;start&#8217; =&gt; $start_record,<br />
                                  &#8216;rows&#8217;  =&gt; $maximum_records ,<br />
                                  &#8216;facet.query&#8217;    =&gt; &#8216;systype&#8217;,<br />
                                  &#8216;systype&#8217;  =&gt; LA<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Cassidy</title>
		<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/comment-page-1/#comment-851</link>
		<dc:creator>Brian Cassidy</dc:creator>
		<pubDate>Sat, 24 Jan 2009 04:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://infomotions.com/blog/?p=134#comment-851</guid>
		<description><![CDATA[To be fair, Ed Summers wrote the SRU modules -- I&#039;ve just helped maintain them.]]></description>
		<content:encoded><![CDATA[<p>To be fair, Ed Summers wrote the SRU modules &#8212; I&#8217;ve just helped maintain them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Ibbotson</title>
		<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/comment-page-1/#comment-848</link>
		<dc:creator>Ian Ibbotson</dc:creator>
		<pubDate>Fri, 23 Jan 2009 23:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://infomotions.com/blog/?p=134#comment-848</guid>
		<description><![CDATA[Heya Jonathan.. Don&#039;t suppose you could enumerate some of your arguments as to why there should be -mime- types for mods/marcxml etc? 

There has always been a bit of an elephant in the room with the issue of identifying schemas, from the &quot;XML&quot; and element set name wranglings of Z3950 to the advanced SRU &quot;It&#039;s just a URI (Lets hope naming the problem happens to solve it too)&quot;

If the answer to these problems is &quot;Just give everything a mime type&quot; then thats cool (We certainly need some registry) but what should the mime type for mods actually look like?]]></description>
		<content:encoded><![CDATA[<p>Heya Jonathan.. Don&#8217;t suppose you could enumerate some of your arguments as to why there should be -mime- types for mods/marcxml etc? </p>
<p>There has always been a bit of an elephant in the room with the issue of identifying schemas, from the &#8220;XML&#8221; and element set name wranglings of Z3950 to the advanced SRU &#8220;It&#8217;s just a URI (Lets hope naming the problem happens to solve it too)&#8221;</p>
<p>If the answer to these problems is &#8220;Just give everything a mime type&#8221; then thats cool (We certainly need some registry) but what should the mime type for mods actually look like?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Rochkind</title>
		<link>http://infomotions.com/blog/2009/01/fun-with-webservicesolr-part-iii-of-iii/comment-page-1/#comment-845</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Fri, 23 Jan 2009 15:42:59 +0000</pubDate>
		<guid isPermaLink="false">http://infomotions.com/blog/?p=134#comment-845</guid>
		<description><![CDATA[I&#039;ve been spending some time with the OpenSearch spec lately in anticipation of using it in a particular future project I have in mind. 

I&#039;ve been quite impressed with it. I think the idea of merging SRU into OpenSearch is a good one. 

It&#039;s not really true to say that &quot;OpenSearch returns an RSS-like data stream&quot; -- rather an OpenSearch description can specify exactly what format is returned using a MIME type, and can even specify different URLs for retrieving different formats.  So I think it&#039;s rather compatible with SRU here. There&#039;s no reason an OpenSearch description can&#039;t declare results returned in MARC-XML or anything else. (I hope MARCXML, MODS, etc, have declared mime types? If not they need to asap for a billion reasons!)

Also, while an OpenSearch description document doesn&#039;t declare any particular syntax for it&#039;s query, there&#039;s no reason an OpenSearch query _couldn&#039;t_ be in CQL. 

It would seem useful to me to extend OpenSearch to allow a description document to specify that CQL is supported, and specify what search indexes the server provides, or any other CQL-related metadata. 

One of the most useful parts of OpenSearch is how it allows easy extensibility using custom namespaces. I am actually not that familiar with SRU, and haven&#039;t read that OASIS document yet, but I hope they take the approach of trying to fit SRU into the existing OpenSearch standard, rather than creating a new &#039;umbrella&#039; standard on top of it. I think the OpenSearch standard would be quite suited to this. 

I perused the OpenSearch listserv recently, and I didn&#039;t see any mention of OASIS or SRU. I hope the OASIS folks are actually talking to the OpenSearch folks about this, rather than just doing things in their own silo. The OpenSearch folks seem to me to be quite on top of things, and interested in making sure OpenSearch supports new use cases in the &#039;right&#039; way.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve been spending some time with the OpenSearch spec lately in anticipation of using it in a particular future project I have in mind. </p>
<p>I&#8217;ve been quite impressed with it. I think the idea of merging SRU into OpenSearch is a good one. </p>
<p>It&#8217;s not really true to say that &#8220;OpenSearch returns an RSS-like data stream&#8221; &#8212; rather an OpenSearch description can specify exactly what format is returned using a MIME type, and can even specify different URLs for retrieving different formats.  So I think it&#8217;s rather compatible with SRU here. There&#8217;s no reason an OpenSearch description can&#8217;t declare results returned in MARC-XML or anything else. (I hope MARCXML, MODS, etc, have declared mime types? If not they need to asap for a billion reasons!)</p>
<p>Also, while an OpenSearch description document doesn&#8217;t declare any particular syntax for it&#8217;s query, there&#8217;s no reason an OpenSearch query _couldn&#8217;t_ be in CQL. </p>
<p>It would seem useful to me to extend OpenSearch to allow a description document to specify that CQL is supported, and specify what search indexes the server provides, or any other CQL-related metadata. </p>
<p>One of the most useful parts of OpenSearch is how it allows easy extensibility using custom namespaces. I am actually not that familiar with SRU, and haven&#8217;t read that OASIS document yet, but I hope they take the approach of trying to fit SRU into the existing OpenSearch standard, rather than creating a new &#8216;umbrella&#8217; standard on top of it. I think the OpenSearch standard would be quite suited to this. </p>
<p>I perused the OpenSearch listserv recently, and I didn&#8217;t see any mention of OASIS or SRU. I hope the OASIS folks are actually talking to the OpenSearch folks about this, rather than just doing things in their own silo. The OpenSearch folks seem to me to be quite on top of things, and interested in making sure OpenSearch supports new use cases in the &#8216;right&#8217; way.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
