eZ Community » Forums » eZ Publish 5 Platform » Search multiple selection
expandshrink

Search multiple selection

Search multiple selection

Monday 14 April 2014 10:31:24 am - 3 replies

Hello,

I have a problem with search on multiple selection. I use this criteria :

$criteria[] = new Criterion\Field(  'themes', Criterion\Operator::IN,  $themes );

When my object is define with only one selection it works. But I don't have any result when I do a multiple selection : for my themes fields I select to option when I create my object.

Thanks for your help

Tuesday 22 April 2014 12:06:02 pm

So there is no solution for this issue. Multiple selection is not searchable... (depend on ez 4) . Not a bug...but a lack.

Tuesday 21 April 2015 12:13:15 pm

Possible workaround :

foreach($themes as $theme) {

$criteria[] = new Criterion\Field('themes',Criterion\Operator::CONTAINS,$theme);

}

$criteria= new Criterion\LogicalOr($criteria);

I hope it helps you !

Modified on Tuesday 21 April 2015 12:16:58 pm by Laurent POIRET

Monday 27 April 2015 12:14:43 pm

PS: check page load time, dont forget. I have some problem with the Full and Field search (around 2000 Articles)

Im using legacy search , works fine and faster.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from