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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:09:56
Script start
Timing: Jan 18 2025 02:09:56
Module start 'layout'
Timing: Jan 18 2025 02:09:56
Module start 'content'
Timing: Jan 18 2025 02:09:57
Module end 'content'
Timing: Jan 18 2025 02:09:57
Script end

Main resources:

Total runtime0.5016 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.2031152.6563
Module start 'layout' 0.00600.0039 740.859439.5234
Module start 'content' 0.00990.4901 780.3828503.4609
Module end 'content' 0.49990.0016 1,283.843812.0859
Script end 0.5015  1,295.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.6719160.0002
Check MTime0.00140.2747160.0001
Mysql Total
Database connection0.00100.189810.0010
Mysqli_queries0.452490.1961570.0079
Looping result0.00060.1224550.0000
Template Total0.464292.520.2321
Template load0.00200.400920.0010
Template processing0.462192.140720.2311
Template load and register function0.00010.022110.0001
states
state_id_array0.00080.152710.0008
state_identifier_array0.00110.223120.0006
Override
Cache load0.00170.3308150.0001
Sytem overhead
Fetch class attribute can translate value0.00070.131410.0007
Fetch class attribute name0.00110.226740.0003
XML
Image XML parsing0.00050.096110.0005
class_abstraction
Instantiating content class attribute0.00000.003660.0000
General
dbfile0.00090.1764170.0001
String conversion0.00000.002040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs