Forums / Extensions / eZ Find / eZ Find query: OR condition between words/phrases (flection)

eZ Find query: OR condition between words/phrases (flection)

Author Message

Piotrek Karaś

Friday 25 September 2009 10:56:43 am

Hello,

Is it possible to create an eZ Find query which would search for either query words of phrases (OR condition) rather than for content that contains all of them (AND condition)? I'm not sure if this isn't against solr logic - I would be grateful for any feedback on this issue.

What I'm trying to create is a multi-step search. By default, I would like to try search for all and precise phrases the user gave. However, if none/few results pop out, I would like to run query #2, which would include all available flection of those words. Step #3: thesaurus based reladed meanings with their flection. The problem is that flection of a word can result in tens of words, and no content object is likely to have them all at the same time.

Thanks,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Piotrek Karaś

Friday 25 September 2009 11:39:59 am

Just tried to force q.op=OR option in ezfeZPSolrQueryBuilder::buildSearch() method, but it didn't seem to change anything... Chances are, though, that I did something wrong... Any thoughts?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Piotrek Karaś

Sunday 27 September 2009 1:39:41 am

How about simple OR-separated search query string? Would it be that simple? Not sure of the rules, but it... works ;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu