I'm dynamically adding field/value pairs into Examine when I index content (I'm using content snippets within pages and want the text within those snippets to be searchable).
Because I'm dynamically adding these values into the Examine index, I don't know for sure what the field names will be, so can't explicitly define them in the SearchFields property of the ezSearch model.
Is there a way to tell ezSearch to just search all fields rather than having to specify them?
So the way I've got around this (which is possibly is a bit heavy-handed) is to add a property to my "Site Settings" content item (which contains nav, footer, list values etc) to hold the Search Fields as a comma-separated string.
Each time I dynamically add a field/value pair into examine for a piece of content, I add the field name (e.g. "_customContent1") to this Search Fields string.
Then in my ezSearch macro I grab this property and feed it into the Model.
This works fine, but If anyone has a better way approach please let me know!
ezSearch - can you set SearchFields to "all"?
Hi,
I'm dynamically adding field/value pairs into Examine when I index content (I'm using content snippets within pages and want the text within those snippets to be searchable).
Because I'm dynamically adding these values into the Examine index, I don't know for sure what the field names will be, so can't explicitly define them in the SearchFields property of the ezSearch model.
Is there a way to tell ezSearch to just search all fields rather than having to specify them?
Thanks,
Maff
So the way I've got around this (which is possibly is a bit heavy-handed) is to add a property to my "Site Settings" content item (which contains nav, footer, list values etc) to hold the Search Fields as a comma-separated string.
Each time I dynamically add a field/value pair into examine for a piece of content, I add the field name (e.g. "_customContent1") to this Search Fields string.
Then in my ezSearch macro I grab this property and feed it into the Model.
This works fine, but If anyone has a better way approach please let me know!
Cheers,
Maff
is working on a reply...