ListIt2 - search_* parameter only matches exact string?
Posted: Mon Jul 21, 2014 9:15 am
I have a ListIt2 instance where my items are made up of text input and text area fields.
Suppose I have a text input field with the alias "animals". Item 1 has "dog cat horse" and Item 2 has "cat" for this field. When I call {ListIt2MyInstance search_animals="cat"} I only get Item 2 in my results, and not Item 1. So search_* only seems to match items where the field matches the search term exactly; it's not enough that the field just contains the search term.
This is surprising - is this the way this parameter is meant to work? Isn't there some way to search for items where specific fields contain a term (but may also contain other terms)? The general search parameter does this, but it searches all fields and I want to limit my search to particular fields.
Also, is it possible to use the action="search" parameter to generate a search form on the frontend that only searches particular fields?
Suppose I have a text input field with the alias "animals". Item 1 has "dog cat horse" and Item 2 has "cat" for this field. When I call {ListIt2MyInstance search_animals="cat"} I only get Item 2 in my results, and not Item 1. So search_* only seems to match items where the field matches the search term exactly; it's not enough that the field just contains the search term.
This is surprising - is this the way this parameter is meant to work? Isn't there some way to search for items where specific fields contain a term (but may also contain other terms)? The general search parameter does this, but it searches all fields and I want to limit my search to particular fields.
Also, is it possible to use the action="search" parameter to generate a search form on the frontend that only searches particular fields?