<?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 for Robot Librarian</title>
	<atom:link href="http://robotlibrarian.billdueber.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://robotlibrarian.billdueber.com</link>
	<description>Disclaimer: I'm not actually a robot.</description>
	<lastBuildDate>Thu, 01 Dec 2011 18:10:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Solr and boolean operators by Jonathan Rochkind</title>
		<link>http://robotlibrarian.billdueber.com/solr-and-boolean-operators/comment-page-1/#comment-6362</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Thu, 01 Dec 2011 18:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=402#comment-6362</guid>
		<description>&lt;p&gt;PS: Sorry, I see you covered edismax too, thanks!&lt;/p&gt;

&lt;p&gt;PPS: One answer I&#039;ve gotten from solr-ites is basically &quot;Well, yeah, AND/OR aren&#039;t &lt;em&gt;really&lt;/em&gt; boolean operators to these query parsers, they are just indication of lucene optional/required clauses.&quot;&lt;/p&gt;

&lt;p&gt;To which my answer is: &quot;Okay, but then why use syntax that looks like boolean algebra, and that makes it very hard to predict exactly &lt;em&gt;how&lt;/em&gt; they are translated to optional/required clauses, to the novice. Why not use a different syntax that actually indicates what it&#039;s doing?&quot;  Perhaps the answer is &quot;Well, becuase users are used to AND/OR&quot;, but I think it&#039;s no service to give users a syntax they are used to but with semantics that they are NOT used to!&lt;/p&gt;

&lt;p&gt;However, it&#039;s possible that if you keep in mind &quot;translating to lucene optional/mandatory clauses&quot;, it will be the right mental model to figure out why the query parsers are doing what they&#039;re doing. Although I still can&#039;t figure it out, especially for some of the especially weird cases where terms are dropped altogether.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>PS: Sorry, I see you covered edismax too, thanks!</p>

<p>PPS: One answer I&#8217;ve gotten from solr-ites is basically &#8220;Well, yeah, AND/OR aren&#8217;t <em>really</em> boolean operators to these query parsers, they are just indication of lucene optional/required clauses.&#8221;</p>

<p>To which my answer is: &#8220;Okay, but then why use syntax that looks like boolean algebra, and that makes it very hard to predict exactly <em>how</em> they are translated to optional/required clauses, to the novice. Why not use a different syntax that actually indicates what it&#8217;s doing?&#8221;  Perhaps the answer is &#8220;Well, becuase users are used to AND/OR&#8221;, but I think it&#8217;s no service to give users a syntax they are used to but with semantics that they are NOT used to!</p>

<p>However, it&#8217;s possible that if you keep in mind &#8220;translating to lucene optional/mandatory clauses&#8221;, it will be the right mental model to figure out why the query parsers are doing what they&#8217;re doing. Although I still can&#8217;t figure it out, especially for some of the especially weird cases where terms are dropped altogether.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Solr and boolean operators by Jonathan Rochkind</title>
		<link>http://robotlibrarian.billdueber.com/solr-and-boolean-operators/comment-page-1/#comment-6361</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Thu, 01 Dec 2011 18:03:51 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=402#comment-6361</guid>
		<description>&lt;p&gt;So the way I handle part of this at present is not actually passing these user-entered boolean queries straight to any solr query parser (not lucene, not edismax either; curious if edismax has the same or similar idiosyncracies, I predict it will).&lt;/p&gt;

&lt;p&gt;Instead, I actually parse all user queries in my own application, and then construct Solr queries (using a &#039;lucene&#039; type query, with nested dismax type queries) that I know do what is needed for the user query to be interpreted with more typical boolean logic.&lt;/p&gt;

&lt;p&gt;Of course, it&#039;s possible I&#039;ve gotten it wrong too, but theoretically my parser/interpreter can then be fixed to what I want.&lt;/p&gt;

&lt;p&gt;Now, it might make even MORE sense to do this as an actual custom Solr query parser, but I lack the Solr/java comfort/skills to do that, so I&#039;d rather do it in ruby. I think it would probably in some ways be better to do this in Java as a Solr plug-in query parser, rather than at the application layer, but oh well.&lt;/p&gt;

&lt;p&gt;Here&#039;s the specs from my code that show how various user-entered queries are translated to Solr. Note they also take care of various types of &quot;pure negative&quot; queries that lucene and dismax query parsers can&#039;t handle &#039;right&#039; either (I think edismax fixes some but not all of these &#039;pure negative&#039; cases). Hopefully the spec file is somewhat readable, despite (or because of!) the helper functions I put in to test generated solr query params against templates.&lt;/p&gt;

&lt;p&gt;https://github.com/projectblacklight/blacklight_advanced_search/blob/master/spec/parsing_nesting/to_solr_spec.rb&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>So the way I handle part of this at present is not actually passing these user-entered boolean queries straight to any solr query parser (not lucene, not edismax either; curious if edismax has the same or similar idiosyncracies, I predict it will).</p>

<p>Instead, I actually parse all user queries in my own application, and then construct <acronym title="Solr isn\'t an acronym, silly!">Solr</acronym> queries (using a &#8216;lucene&#8217; type query, with nested dismax type queries) that I know do what is needed for the user query to be interpreted with more typical boolean logic.</p>

<p>Of course, it&#8217;s possible I&#8217;ve gotten it wrong too, but theoretically my parser/interpreter can then be fixed to what I want.</p>

<p>Now, it might make even MORE sense to do this as an actual custom <acronym title="Solr isn\'t an acronym, silly!">Solr</acronym> query parser, but I lack the <acronym title="Solr isn\'t an acronym, silly!">Solr</acronym>/java comfort/skills to do that, so I&#8217;d rather do it in ruby. I think it would probably in some ways be better to do this in Java as a <acronym title="Solr isn\'t an acronym, silly!">Solr</acronym> plug-in query parser, rather than at the application layer, but oh well.</p>

<p>Here&#8217;s the specs from my code that show how various user-entered queries are translated to <acronym title="Solr isn\'t an acronym, silly!">Solr</acronym>. Note they also take care of various types of &#8220;pure negative&#8221; queries that lucene and dismax query parsers can&#8217;t handle &#8216;right&#8217; either (I think edismax fixes some but not all of these &#8216;pure negative&#8217; cases). Hopefully the spec file is somewhat readable, despite (or because of!) the helper functions I put in to test generated solr query params against templates.</p>

<p><a href="https://github.com/projectblacklight/blacklight_advanced_search/blob/master/spec/parsing_nesting/to_solr_spec.rb" rel="nofollow">https://github.com/projectblacklight/blacklight_advanced_search/blob/master/spec/parsing_nesting/to_solr_spec.rb</a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Even better, even simpler multithreading with JRuby by Why bother with threading in jruby? Because it&#8217;s easy. &#171; Robot Librarian</title>
		<link>http://robotlibrarian.billdueber.com/even-better-even-simpler-multithreading-with-jruby/comment-page-1/#comment-2057</link>
		<dc:creator>Why bother with threading in jruby? Because it&#8217;s easy. &#171; Robot Librarian</dc:creator>
		<pubDate>Fri, 01 Jul 2011 22:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=360#comment-2057</guid>
		<description>&lt;p&gt;[...] written a jruby_specific threach that takes advantage of better underlying java libraries called jruby_threach that is a much better option if you&#039;re running [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] written a jruby_specific threach that takes advantage of better underlying java libraries called jruby_threach that is a much better option if you&#039;re running [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Even better, even simpler multithreading with JRuby by Bill</title>
		<link>http://robotlibrarian.billdueber.com/even-better-even-simpler-multithreading-with-jruby/comment-page-1/#comment-2056</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Fri, 01 Jul 2011 18:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=360#comment-2056</guid>
		<description>&lt;p&gt;Whoops! Thanks, and fixed.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Whoops! Thanks, and fixed.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Even better, even simpler multithreading with JRuby by Bob Loblaw</title>
		<link>http://robotlibrarian.billdueber.com/even-better-even-simpler-multithreading-with-jruby/comment-page-1/#comment-2055</link>
		<dc:creator>Bob Loblaw</dc:creator>
		<pubDate>Fri, 01 Jul 2011 18:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=360#comment-2055</guid>
		<description>&lt;p&gt;s/jquery_threach/jruby_threach/&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>s/jquery_threach/jruby_threach/</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on A short ruby diversion: cost of flow control under Ruby by Jonathan Rochkind</title>
		<link>http://robotlibrarian.billdueber.com/a-short-ruby-diversion-cost-of-flow-control-under-ruby/comment-page-1/#comment-1905</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Sat, 18 Jun 2011 14:37:04 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=308#comment-1905</guid>
		<description>&lt;p&gt;Another blog figures out the same thing, posted on reddit. You beat them to it! http://www.coffeepowered.net/2011/06/17/jruby-performance-exceptions-are-not-flow-control/&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Another blog figures out the same thing, posted on reddit. You beat them to it! <a href="http://www.coffeepowered.net/2011/06/17/jruby-performance-exceptions-are-not-flow-control/" rel="nofollow">http://www.coffeepowered.net/2011/06/17/jruby-performance-exceptions-are-not-flow-control/</a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on A short ruby diversion: cost of flow control under Ruby by Jonathan Rochkind</title>
		<link>http://robotlibrarian.billdueber.com/a-short-ruby-diversion-cost-of-flow-control-under-ruby/comment-page-1/#comment-1153</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Wed, 04 May 2011 23:29:58 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=308#comment-1153</guid>
		<description>&lt;p&gt;And briefly looking up the documentation on throw/catch, I&#039;m wrong about the catch having to be statically scoped in a block above the &#039;throw&#039; (the page I found in the online old ruby book actually specifically tells you this isn&#039;t the case even though you might think it is, heh). But I&#039;m still confused about where throw/catch can actually be used. It&#039;s like the least used ruby language feature ever. But if lots of people are using raise/rescue for flow control, maybe throw/catch ought to be marketted better.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>And briefly looking up the documentation on throw/catch, I&#8217;m wrong about the catch having to be statically scoped in a block above the &#8216;throw&#8217; (the page I found in the online old ruby book actually specifically tells you this isn&#8217;t the case even though you might think it is, heh). But I&#8217;m still confused about where throw/catch can actually be used. It&#8217;s like the least used ruby language feature ever. But if lots of people are using raise/rescue for flow control, maybe throw/catch ought to be marketted better.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on A short ruby diversion: cost of flow control under Ruby by Jonathan Rochkind</title>
		<link>http://robotlibrarian.billdueber.com/a-short-ruby-diversion-cost-of-flow-control-under-ruby/comment-page-1/#comment-1152</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Wed, 04 May 2011 23:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=308#comment-1152</guid>
		<description>&lt;p&gt;PS: Am I the only one that never uses those raise syntactic sugar shortcuts?  I always actually create the Exception object myself:&lt;/p&gt;

&lt;p&gt;raise StandardError.new&lt;/p&gt;

&lt;p&gt;&quot;raise StandardError&quot; does the same thing, it&#039;s just a shortcut.  And:&lt;/p&gt;

&lt;p&gt;raise StandardError, &quot;message&quot; ==== raise StandardError.new(&quot;message&quot;)&lt;/p&gt;

&lt;p&gt;I don&#039;t know the way to avoid backtrace generation when throwing an actually explicitly created Exception object, but there probably is one.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>PS: Am I the only one that never uses those raise syntactic sugar shortcuts?  I always actually create the Exception object myself:</p>

<p>raise StandardError.new</p>

<p>&#8220;raise StandardError&#8221; does the same thing, it&#8217;s just a shortcut.  And:</p>

<p>raise StandardError, &#8220;message&#8221; ==== raise StandardError.new(&#8220;message&#8221;)</p>

<p>I don&#8217;t know the way to avoid backtrace generation when throwing an actually explicitly created Exception object, but there probably is one.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on A short ruby diversion: cost of flow control under Ruby by Jonathan Rochkind</title>
		<link>http://robotlibrarian.billdueber.com/a-short-ruby-diversion-cost-of-flow-control-under-ruby/comment-page-1/#comment-1150</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Wed, 04 May 2011 23:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=308#comment-1150</guid>
		<description>&lt;p&gt;For flow control in ruby, there&#039;s actually a throw/catch architecture, which is an entirely different beast from raise/rescue. Nobody hardly ever uses them, throw/catch, I never see em, never used em myself either.&lt;/p&gt;

&lt;p&gt;Note: raise/rescue DO correspond to JAVA&#039;s throw/catch.  ruby&#039;s  throw/catch is something different: It can only be used in &#039;static scoped&#039; situations, basically where the catch is in a static code block that&#039;s a parent of the throw.  But if people are using raise/rescue for &#039;flow control&#039; scenarios in places where throw/catch would work.... would be interesting to benchmark the performance of throw/catch.  throw/catch at least is indeed actually intended for flow control.&lt;/p&gt;

&lt;p&gt;Maybe nobody uses em cause they smell suspiciosuly like the dreaded &#039;goto&#039;, but that&#039;s essentially what you&#039;re doing with raise/rescue if you&#039;re using em for flow control too, and apparently that doesn&#039;t stop some people?  Very curious what code you saw that was using raise/rescue like this, it&#039;s certainly not a recommended thing to do by anyone (I don&#039;t think?).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For flow control in ruby, there&#8217;s actually a throw/catch architecture, which is an entirely different beast from raise/rescue. Nobody hardly ever uses them, throw/catch, I never see em, never used em myself either.</p>

<p>Note: raise/rescue DO correspond to JAVA&#8217;s throw/catch.  ruby&#8217;s  throw/catch is something different: It can only be used in &#8216;static scoped&#8217; situations, basically where the catch is in a static code block that&#8217;s a parent of the throw.  But if people are using raise/rescue for &#8216;flow control&#8217; scenarios in places where throw/catch would work&#8230;. would be interesting to benchmark the performance of throw/catch.  throw/catch at least is indeed actually intended for flow control.</p>

<p>Maybe nobody uses em cause they smell suspiciosuly like the dreaded &#8216;goto&#8217;, but that&#8217;s essentially what you&#8217;re doing with raise/rescue if you&#8217;re using em for flow control too, and apparently that doesn&#8217;t stop some people?  Very curious what code you saw that was using raise/rescue like this, it&#8217;s certainly not a recommended thing to do by anyone (I don&#8217;t think?).</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on ISBN parenthetical notes: Bad MARC data #1 by Matthew Phillips</title>
		<link>http://robotlibrarian.billdueber.com/isbn-parenthetical-notes-bad-marc-data-1/comment-page-1/#comment-1039</link>
		<dc:creator>Matthew Phillips</dc:creator>
		<pubDate>Mon, 18 Apr 2011 09:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://robotlibrarian.billdueber.com/?p=296#comment-1039</guid>
		<description>&lt;p&gt;Yet another example of where the UKMARC format was superior.  In UKMARC the ISBN was in subfield &quot;a&quot;, qualifying remarks in subfield &quot;c&quot; and price in subfield &quot;d&quot;.  There was even a subfield &quot;b&quot; with a code to indicate the type of ISBN (e.g. whether it was the ISBN for a set of volumes or an individual volume).&lt;/p&gt;

&lt;p&gt;Sadly UKMARC was abandoned about ten years ago because it was just so unsatisfactory trying to convert from USMARC to UKMARC.  It&#039;s always easier to convert metadata into a format which is less expressive, so we all moved to USMARC instead.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yet another example of where the UKMARC format was superior.  In UKMARC the <acronym title="International Standard Book Number">ISBN</acronym> was in subfield &#8220;a&#8221;, qualifying remarks in subfield &#8220;c&#8221; and price in subfield &#8220;d&#8221;.  There was even a subfield &#8220;b&#8221; with a code to indicate the type of <acronym title="International Standard Book Number">ISBN</acronym> (e.g. whether it was the <acronym title="International Standard Book Number">ISBN</acronym> for a set of volumes or an individual volume).</p>

<p>Sadly UKMARC was abandoned about ten years ago because it was just so unsatisfactory trying to convert from USMARC to UKMARC.  It&#8217;s always easier to convert metadata into a format which is less expressive, so we all moved to USMARC instead.</p>]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.566 seconds -->

