<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ian Winter &#187; java</title>
	<atom:link href="http://ianwinter.co.uk/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianwinter.co.uk</link>
	<description>Have you found the instructions yet?</description>
	<lastBuildDate>Wed, 14 Sep 2011 22:16:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Sphinx Multi-Value Attributes</title>
		<link>http://ianwinter.co.uk/2009/07/06/sphinx-multi-value-attributes/</link>
		<comments>http://ianwinter.co.uk/2009/07/06/sphinx-multi-value-attributes/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 10:03:18 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mva]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1054</guid>
		<description><![CDATA[Sphinx allows you to create a multi-value attribute index which is great for document tags or categories. By default if you search across these the search is an OR match. If you want to run an AND match you must specify multiple filters rather than passing an array of values. In ColdFusion using the Java [...]]]></description>
			<content:encoded><![CDATA[<p>Sphinx allows you to create a multi-value attribute index which is great for document tags or categories. By default if you search across these the search is an OR match. If you want to run an AND match you must specify multiple filters rather than passing an array of values.</p>
<p>In ColdFusion using the Java API requires a little tweak as you can&#8217;t pass a normal ColdFusion array to sphinx, you have to use a basic java type array. Tim Blair has a <a href="http://tim.bla.ir/tech/articles/cf-and-arrays-of-basic-java-types" target="_blank">good article</a> on how to create them but here&#8217;s an example of calling the API.</p>
<p>This example will search for document tagged with either 100 or 200. Note the array creation method.</p>
<p><code>&lt;cfset variables.sphinx = createobject("java", "org.sphx.api.SphinxClient").init()&gt;<br />
&lt;cfset variables.sphinx.SetLimits(0, 10)&gt;<br />
&lt;cfset variables.arrObj = createobject("java", "java.lang.reflect.Array")&gt;<br />
&lt;cfset variables.jClass = createobject("java", "java.lang.Integer").TYPE&gt;<br />
&lt;cfset variables.jArr = variables.arrObj.newInstance(variables.jClass, 2)&gt;<br />
&lt;cfset variables.arrObj.setInt(variables.jArr, 0, 100)&gt;<br />
&lt;cfset variables.arrObj.setInt(variables.jArr, 1, 200)&gt;<br />
&lt;cfset variables.sphinx.SetFilter("tag", variables.jArr, FALSE)&gt;</code></p>
<p>If you want to search for 100 AND 200 you&#8217;d do it like this:</p>
<p><code>&lt;cfset variables.sphinx = createobject("java", "org.sphx.api.SphinxClient").init()&gt;<br />
&lt;cfset variables.sphinx.SetLimits(0, 10)&gt;<br />
&lt;cfset variables.sphinx.SetFilter("tag", 100, FALSE)&gt;<br />
&lt;cfset variables.sphinx.SetFilter("tag", 200, FALSE)&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2009/07/06/sphinx-multi-value-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coldfusion 6.1 Linux Hotspot Crashes</title>
		<link>http://ianwinter.co.uk/2006/01/13/coldfusion-61-linux-hotspot-crashes/</link>
		<comments>http://ianwinter.co.uk/2006/01/13/coldfusion-61-linux-hotspot-crashes/#comments</comments>
		<pubDate>Fri, 13 Jan 2006 22:12:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[hotspot]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Had another hotspot crash on a Linux server again today after months of not having any. Doing a bit of googling and finding myself back on Steven Erat&#8217;s very useful blog I found a user comment saying that in Sun&#8217;s JRE 1.4.2_10 they seem to have fixed the problem. As a result I&#8217;ve updated it [...]]]></description>
			<content:encoded><![CDATA[<p>Had another hotspot crash on a Linux server again today after months of not having any. Doing a bit of googling and finding myself back on <a href="http://www.talkingtree.com/blog/index.cfm/2004/5/21/hscrashlog0504" target="_blank">Steven Erat&#8217;s</a> very useful blog I found a user comment saying that in Sun&#8217;s JRE 1.4.2_10 they seem to have fixed the problem. As a result I&#8217;ve updated it along with a couple of hotfixes to CF and all seems well.</p>
<p>You can get the <a href="http://java.sun.com/j2se/1.4.2/download.html" target="_blank">JRE</a> from Sun&#8217;s Java site.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2006/01/13/coldfusion-61-linux-hotspot-crashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

