I've been playing around with creating a collection in Apache Solr via ColdFusion 9 from a database result set. I would like to do a search which would be as follows in SQL:
select * from events where eventName like 'Meet%'
In SQL this will match partially on a word and return the row. I am trying to do this using a Solr collection and <cfsearch>
in CF like so:
<cfsearch collection="#myCollection#" criteria="Meet*" name="results" />
However I am not getting the data back unless I specify the full word, despite the use of the wildcard. The docs say the wildcard is not allowed at the start of the search but it doesn't say it's not allowed at the end. In fact for me it doesn't work anywhere!
<!--- No results -->
<cfsearch collection="#myCollection#" criteria="Meet*" name="results" />
<!--- No results -->
<cfsearch collection="#myCollection#" criteria="Meet*g" name="results" />
<!--- No results -->
<cfsearch collection="#myCollection#" criteria="Meeti?g" name="results" />
<!--- Yes - results! -->
<cfsearch collection="#myCollection#" criteria="Meeting" name="results" />
Has anyone implemented a wildcard Solr search using <cfsearch>
? If so can you point me in the right direction on this please?