Sam Farmer head shot

Sam Farmer

Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened.

But I have become a passionate and pretty good web developer.


Starting Solr for ColdFusion on a Mac

Here is a straightforward way to start Solr when running ColdFusion 9 on a Mac. If it is not running in the ColdFusion Administrator under Data & Services > ColdFusion Collections the following message will appear:

Unable to retrieve collections from any of the Search Services. Please verify that atleast one of ColdFusion Search Services is installed and running.

To get it running run the following two lines in Terminal:

view plain print about
1cd /Applications/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/solr
2./cfsolr start

Thats for multi-instance installs for ColdFusion 9 standard install it will be:

view plain print about
1cd /Applications/ColdFusion9/solr
2./cfsolr start

Within seconds Solr will be up and running and collections will show on the page above.

(As a quick note don't delete core0 collection as its needed to get everything up and running.)

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Thank you very much, Sam!

I installed CF 9 multiserver and created a second instance of CF. I see the SOLR folder within the cfusion directory, but I don't see this folder within the second instance's directory. Does SOLR not get setup with each new CF instance created? Is it as simple as copying the folder over to the second instance's directory? Not certain what the best approach is. Any suggestions would be appreciated.
# Posted By James Eisenlohr | 4/14/11 10:37 AM
@James The easiest thing to do is to have both instances point to the same solr server. That way they share the collections. In CF Admin, simply copy the Solr server info from the first instance and put it in the second.
# Posted By Sam Farmer | 4/17/11 9:03 AM
One thing that tripped me up for quite a while this morning is that you MUST be in the solr directory when issuing the start and stop commands. Like Steven Erat says is the blog post below if you start it from any other location you're going to have an issue with finding start.jar, but that message will be suppressed and you will be led to believe solr is running. In my case I had an alias to cfsolr which I thought would allow me to start solr from any location.

http://www.talkingtree.com/blog/index.cfm/2010/3/1...
# Posted By Ryan Arneson | 4/27/11 1:10 PM
@Ryan Thanks for posting that.
# Posted By Sam Farmer | 4/30/11 2:09 PM
FYI, solr must be started from WITHIN the solr/ directory. If you call the command from elsewhere, it will tell you it started (or stopped), but it's lying to you. You can fix the script to make it tell the truth: http://bit.ly/qIr0Z3
# Posted By Steven Erat | 4/24/12 4:31 PM
Well, you can see who posts before reading all the comments. :)
# Posted By Steven Erat | 4/24/12 5:01 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.7. Contact Blog Owner