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
|
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
|