0

Search plugin in working well but, I have to give either of conditions.

Example:

'name' => array('type' => 'like', 'encode' => true,
             'before' => false, 'after' => true,
                'wildcardAny' => '%', 'wildcardOne' => '_'),

Now.. When I set it to before false and after true, it searches for: keyword%

I want a condition that first search for all that is keyword% then, if there is a space it should do keyword-secondword% then search for keywordSecondword% then keyword%secondword% and finally if nothing is found then %secondkeyword and if still not found then %keyword%

Now, when I try to do:

if(empty($this->paginate))
{ // set query and Prg->common->process  }

It doesn't work!

I want heavy regex matching and stuff on controller and all the database heavy lifting by Models.

I have to search on the basis of priority.

Any ideas?

Keval Domadia
  • 4,768
  • 1
  • 37
  • 64
  • For such custom scenarios use custom type "query" and manually build your query based on the input. For "if nothing is found" you would need to run pre-querys which will be very hard to do given the complexity of such requirements. – mark Jul 27 '13 at 12:48
  • I gather what you said. But, when I loop through, it still has the same information which it's previous cycle stored. I have updated a feature request on their GitHub. Let's hope they respond. https://github.com/CakeDC/search/issues/90 – Keval Domadia Jul 27 '13 at 16:20

0 Answers0