Searching Multiple Fields - Only Returning Last Field
Having an issue with searching through multiple fields. Seems like only the last field is being used in the search because when I added a new field called keywords (used for misspellings) to the end I find that only that field brings back results:
Only content in the keyword field is returned. Example search where there is content in "keyword" field:
Example search with no results where keyword is blank but should pick up the yacht name from "yacht_name":
I have attached the search file as well.
Thanks for posting.
The issue here is the "_query" suffix after each field name.
You actually only need it on the last one like this:
Give that shot and let me know how you make out.
Note: You need to make sure you have allowSearch enabled in your getRecords call like this:
list($sample_multi_recordRecords, $sample_multi_recordMetaData) = getRecords(array(
'tableName' => 'sample_multi_record',
'loadUploads' => true,
'allowSearch' => true,
Ross Fairbairn - Consulting
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/