logo       

Re: Fulltext search in content return match in attributes ?: msg#00059

text.xml.exist

Subject: Re: Fulltext search in content return match in attributes ?

> When I am searching for nodes containing a spécific word in the content,
> the result set returns some nodes where the match is included in an
> attribute value.
>
> For example :
> collection('/db/bv/rules/en_03')/dy:fragment/dy:content//P[. &= 'carriers']

Yes, that's normal. The &= operator selects all P nodes that have text
descendants OR attribute values containing the term list. Basically, we can
change that behaviour, but I don't know ...

> I do not put any index options in my conf.xml file in order to specify to
> index or not attributes. Does putting
> /exist/indexer/index[@doctype='my-doctype']/@attributes to false may
> resolve the problem ?

Yes it should.

> How to distinguish a fulltext search in content or in attributes ?

If you only want to search through the attribute, specify it in the path to
&=:

//P[@* &= 'carriers']

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise