Summary:
Search Action: Custom fields must be exact to return results; [expr] value="LIKE" ignored
Detailed Description:
I have company directory installed and I am attempting to setup the search form.
I have a custom textarea field that I would like to include in search. Using the
example in the New Search template I have:
<div class="row">
<p class="col30">Short Description:</p>
<p class="col70">
<input type="hidden" name="{$actionid}cdx_field[0][fldname]"
value="ShortDescription"/>{* hidden input for custom field name *}
<input type="text" name="{$actionid}cdx_field[0][fldval]" value=""/
size="20">{* text input for custom field value *}
<input type="hidden" name="{$actionid}cdx_field[0][expr]" value="LIKE"/>{*
hidden input for custom field expression *}
</p>
</div>
Using the LIKE expression is it correct to assume that this search form would
return results for any instances of the searched word found in the
ShortDescription field? At the moment this is not the case, any search must be
exact or you get no results. In the case of the textareas it is also including
the html markup - I tried setting an example company with "description" as the
value of the ShortDescription field. In the database it is stored as
<p>description</p>. Searching for "description" returned no results. Searching
for "<p>description</p>" returned the company.
I tried setting it to search a dropdown field and the user must type in a search
word that exactly matches the dropdown - ie the value of the dropdown is
"Hawaii-Only", If the user searches for "Hawaii" with LIKE set as the expr no
results are returned. If they type in "Hawaii-Only" it returns the expected
results.
Is this a bug?
Thank you,
Alane