Can I limit search by a custom field for language?
Hi Low:
I'm wondering if with Low Search I can limit a collection or at least the results by a custom field value. I'm using a radio button on every entry in the channel I'm looking to search to set its language to en (english) or fr (french) - which also then matches a global variable set for the user of the active user_language - and so I'm looking to find a way to have a french search and an english search separately leveraging that field value for the entries. Might this be possible in some way either at the collection level or the results tag pair level? I've read through the documentation but not yet spotted a parameter that might let me use my custom field to either specifically include results or exclude results in this fashion. I LOVE the fact that we can control weighting of the search index, so now I just need to find a way around this last hurdle.
Replies
Low 20 Aug 2012 13:20
You can simply use a search:custom_field="en" in the search results tag to limit results only to entries matching that. So that should be possible.
QB Marketing 20 Aug 2012 16:42
Oh wow. I didn't pick up on that. Low, thank you!