I'm working with a database that stores links to various pieces of government regulation. Each regulation has a discipline, subdiscipline, regulation type, and responsible office. Each one also has a list of assigned keywords.
Previously, we were just using an HTML form to do a <cfquery> to search these items. At one point, someone tied our Google appliance into the keyword search to improve results, but now we're dumping the appliance due to cost issues. I've been asked to come up with a replacement for the appliance, so my first thought was Solr.
I've created a collection, then used cfindex to index it. If I use cfsearch to pull keyword results, it works quite well. Here's my cfindex tag:
<cfindex
collection="docsearch"
action="update"
type="custom"
category="category_name"
body="keyword"
custom1="discipline"
custom2="subdiscipline"
custom3="fulldate_issued"
custom4="office_name"
query="docdata"
key="id"
title="document_title"
urlpath="link">
My problem is that I'm being asked to combine the keyword (Solr) search with the HTML form (select drop-downs for category, subcategory, regulation type, etc) and I'm having some trouble making that work. If someone enters a keyword, no problem. I can use a QoQ to parse the query results. But it's not so easy if the keyword is left blank because then the cfsearch takes AGES to run. I wish I could force a keyword, but going by stats, at least half of everyone omits them, so I don't want to fiddle with how people use the form.
Has anyone here had any experience using Solr to search database content like this?