how to search into XML block?

Author Message

Dhaval Patel

Sunday 08 March 2009 9:22:01 am

hello,

I want to do search operation on XML block.

I have one class and it has one field of type XML block,

but I cannot use "attribute_filter" in fetch function as it is restricted to use on "XML block"...

so what is the other way to search into xml block into fetch function ?

and one more question that I have one more field of type "object relation", i want to search on that also, but it compares only contentobject_id only.

so how do i search the text on "object relation" type field?

Please suggest me what to do to make search possible?

Thanking you ,

Dhaval Patel

With Best Regards,

Dhaval Patel
Team Leader - iNETProcess(I) Pvt. LTD.
dhaval.patel@inetprocess.com
Ph No: +91 79 65 12 35 00
http://www.inetprocess.co.in

Fátima Chapri

Monday 09 March 2009 2:34:09 pm

Hi Dhaval,

Instead of "attribute_filter", you can use "class_attribute_id". Have a look at this http://ez.no/doc/ez_publish/technical_manual/3_9/reference/modules/content/fetch_functions/search

Dhaval Patel

Monday 09 March 2009 10:38:51 pm

thank you Fátima

thanks a lot,

{def $search=fetch( 'content', 'search',hash( 'text',     $searchq,
						                          'class_attribute_id', array( '213', '215', '449', '453', '214') ,
												  'limitation' , array()
												 ) )
}

this works for both xml block as well as object relation type fields.

but this will search for full word like if any field contains "welcome", then if we do search on "wel" or "come" then it doesn't search. we have to give full search.

I tried with

concat('*',$searchq,'*') 

also, but it doesn't work.

it is not a big issue, but i faced this.

Once again, thanks a lot.

Warm regards,

Dhaval Patel

With Best Regards,

Dhaval Patel
Team Leader - iNETProcess(I) Pvt. LTD.
dhaval.patel@inetprocess.com
Ph No: +91 79 65 12 35 00
http://www.inetprocess.co.in

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

Main resources:

Total runtime1.5168 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.0078 589.0313152.6250
Module start 'layout' 0.00780.0032 741.656339.4453
Module start 'content' 0.01101.5043 781.1016497.6875
Module end 'content' 1.51530.0015 1,278.789112.1641
Script end 1.5168  1,290.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2386160.0002
Check MTime0.00140.0950160.0001
Mysql Total
Database connection0.00170.112310.0017
Mysqli_queries1.458396.1438570.0256
Looping result0.00090.0619550.0000
Template Total1.478297.520.7391
Template load0.00230.153220.0012
Template processing1.475897.297620.7379
Template load and register function0.00020.012810.0002
states
state_id_array0.00090.058410.0009
state_identifier_array0.00170.109020.0008
Override
Cache load0.00200.1311290.0001
Sytem overhead
Fetch class attribute can translate value0.00060.041420.0003
Fetch class attribute name0.00100.064630.0003
XML
Image XML parsing0.00020.014620.0001
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00070.0456100.0001
String conversion0.00000.000640.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs