Closed tsmsogn closed 8 years ago
What do you mean with not changeable? What is your setup? And what did you expect to happen?
Thank you for replying.
In https://github.com/CakeDC/search, I think I can override wildcardAny
and wildcardOne
values only in bootstrap.php
. But docs explains like bellow.
public $filterArgs = array(
// use custom wildcards in the frontend (instead of * and ?):
'search_custom_like' => array(
'type' => 'like',
'encode' => true,
'before' => false,
'after' => false,
'wildcardAny' => '%', 'wildcardOne' => '_'
),
);
It should be unified either.
I think I would override wildcardAny
and wildcardOne
values in Model::$filterArgs
too. :)
You should always mention the version, I assume you are using 2.x.
There are no explicit tests for it, but looking at https://github.com/CakeDC/search/blob/master/Model/Behavior/SearchableBehavior.php#L242 and https://github.com/CakeDC/search/blob/master/Model/Behavior/SearchableBehavior.php#L244 or https://github.com/CakeDC/search/blob/master/Model/Behavior/SearchableBehavior.php#L310 it sure looks like as if they are merged just fine, if passed as option. And they are also merged properly from the field settings. So unless you can proof otherwise it sure looks like it works as you expect it to work.
Thank you for advice.
Yes, I am using 2.x. I think it can not override wildcard in each fields like docs. So, I made patch. tsmsogn@a92133d7b3cb35c0f178b89d5df556e68899ba8b
Hey @tsmsogn is this issue resolved for you or its still an issue?
Hi, closing this issue, please reopen if still needed.
Hi,
Thanks about a great plugin. But I think documentation contains a bit misleading.
wildcardAny
andwildcardOne
value is not changeable inModel::$filterArgs
.For example: https://github.com/CakeDC/search/blob/master/Docs/Documentation/Examples.md#advanced-usage
Please let me know if I wrong. :)