jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: contains and full text searching.
Date Thu, 07 Feb 2008 18:57:59 GMT

Hello,

> Hi guys,
> 
> I'm trying to search out an exact phrase, for instance "I 
> want cookies", in a group of nodes but nodes that contain any 
> of those words are being returned.
> 
> XPath : //webfmis:content[jcr:contains(@webfmis:body,"I want 
> cookies")]

Yes, your "I want cookies" will be tokenized and OR-ed. You need to have
something like:

xpath="//webfmis:content[jcr:contains(@webfmis:body,'\"I want
cookies\"')] ";

-Ard

> 
> The above xpath should return one node, it however, returns 
> 2, the second node contains the word "cookies".
> 
> Is there a better way to search for an exact string in binary 
> files and nodes?
> 
> Thanks,
> Sean
> 

Mime
View raw message