Question on advanced search function

Author Message

Toms King

Sunday 20 August 2006 7:51:49 pm

Hi, all,

I want to design a custom search function in advanced search function template which can

achieve the function that search for the result by provides the value of more than two attributes,

which is similar to select * from class company where company.name = "TST" and

company.owner = "Little Tom". Although many ppl ask this question, but their solutions seem

not work for me.

I viewed this post, http://ez.no/community/bugs/search_lacks_multi_attribute_queries

It said that Multi attribute search has been available since 3.2, I think, but has not been

documented nor tested very well. OR/NOT is not supported, AND is allways used.

But when I follow author's instruction, add

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="120" />
<input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['120']['value']}" />

<input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="121" />
<input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['121']['value']}" />

to advancedsearch.tpl, and run it, then nothing has been fetched.

I don't know what does Content_search_attribute_fulltext_classattribute mean, I searched all

the eZpublish files, but didn't find this phrase.

Who can help me, really quite hurry lor....................>___<

Thank you very much.

Best regards,

Toms

Toms King

Monday 21 August 2006 12:47:06 am

I think maybe I got the answer.

just add one line of code

 <input type="hidden"
name="SearchContentClassID"
value="17" />

view this page for details

http://ez.no/bugs/view/7170

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 19:21:47
Script start
Timing: Jan 18 2025 19:21:47
Module start 'layout'
Timing: Jan 18 2025 19:21:47
Module start 'content'
Timing: Jan 18 2025 19:21:49
Module end 'content'
Timing: Jan 18 2025 19:21:49
Script end

Main resources:

Total runtime1.3553 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 589.0625152.6250
Module start 'layout' 0.00750.0033 741.687539.4453
Module start 'content' 0.01081.3430 781.1328427.6953
Module end 'content' 1.35380.0015 1,208.82818.1563
Script end 1.3553  1,216.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2422160.0002
Check MTime0.00130.0935160.0001
Mysql Total
Database connection0.00150.107810.0015
Mysqli_queries1.302196.0769520.0250
Looping result0.00040.0316500.0000
Template Total1.315297.020.6576
Template load0.00240.179320.0012
Template processing1.312896.860320.6564
Template load and register function0.00020.013310.0002
states
state_id_array0.00170.124110.0017
state_identifier_array0.00170.123520.0008
Override
Cache load0.00190.1422270.0001
Sytem overhead
Fetch class attribute can translate value0.00070.048910.0007
Fetch class attribute name0.00230.172720.0012
XML
Image XML parsing0.00020.016210.0002
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00070.0515100.0001
String conversion0.00000.000540.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
2content/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
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs