Re: XPath jcr:contains(.,\"value\") exlude one or more Properties

2017-02-04 Thread Roy Teeuwen
Hey Michael,

You could do it by combining it, search all properties by using the '.' and 
then combine it with an and expression where you say myproperty does not 
contain myvalue (by prefixing it with a minus sign)

For example: /jcr:root//*[jcr:contains(.,'myvalue') and 
jcr:contains(@myproperty,'-myvalue')]]

You can find the specs for the jcr:contains here: 
https://docs.adobe.com/content/docs/en/spec/jcr/1.0/6.6.5.2_jcr_contains_Function.html
 


Greets,
Roy

> On 4 Feb 2017, at 21:18, zerocoo...@web.de wrote:
> 
> Hi,
> 
> thanks for your response. I know this normal search pattern in a specific 
> property.
> I was hoping there is something like a blacklist -> exclude one property but 
> search all others without name theme explicit. It seems not ;-)
> 
> Greetings,
> Michael



signature.asc
Description: Message signed with OpenPGP


Re: XPath jcr:contains(.,\"value\") exlude one or more Properties

2017-02-04 Thread Roy Teeuwen
Just as an extra, seeing as JCR XPath is actually deprecated, you could also 
easily do it in JCR SQL2 ;)

select * from [nt:base] as s where contains(*,'myvalue') and not 
contains(myproperty, 'myvalue')

> On 4 Feb 2017, at 21:48, Roy Teeuwen  wrote:
> 
> Hey Michael,
> 
> You could do it by combining it, search all properties by using the '.' and 
> then combine it with an and expression where you say myproperty does not 
> contain myvalue (by prefixing it with a minus sign)
> 
> For example: /jcr:root//*[jcr:contains(.,'myvalue') and 
> jcr:contains(@myproperty,'-myvalue')]]
> 
> You can find the specs for the jcr:contains here: 
> https://docs.adobe.com/content/docs/en/spec/jcr/1.0/6.6.5.2_jcr_contains_Function.html
>  
> 
> 
> Greets,
> Roy
> 
>> On 4 Feb 2017, at 21:18, zerocoo...@web.de  wrote:
>> 
>> Hi,
>> 
>> thanks for your response. I know this normal search pattern in a specific 
>> property.
>> I was hoping there is something like a blacklist -> exclude one property but 
>> search all others without name theme explicit. It seems not ;-)
>> 
>> Greetings,
>> Michael
> 



signature.asc
Description: Message signed with OpenPGP


XPath jcr:contains(.,"value") exlude one or more Properties

2017-02-04 Thread ZeroCool86
Hi guys,

is it possible to do a jcr:contains(.,"my value") Query and exclude one or more 
properties from being searched for the current search?

Something like "search all possible properties but ignore property1 and 
property2". 
Or is it just possible in the other way explicit name the searched properties 
like "search the term in property3 and property4"...

Thanks, have a nice weekend
Michael


Re: XPath jcr:contains(.,"value") exlude one or more Properties

2017-02-04 Thread Roy Teeuwen
Hey Michael,

That's exactly what first argument is for. The dot "." means that it will 
search all the properties. If you want to search in a specific property, you 
could make it jcr:contains(@myproperty,"my value")

Greets
Roy
> On 4 Feb 2017, at 19:31, zerocoo...@web.de wrote:
> 
> Hi guys,
> 
> is it possible to do a jcr:contains(.,"my value") Query and exclude one or 
> more properties from being searched for the current search?
> 
> Something like "search all possible properties but ignore property1 and 
> property2".
> Or is it just possible in the other way explicit name the searched properties 
> like "search the term in property3 and property4"...
> 
> Thanks, have a nice weekend
> Michael



signature.asc
Description: Message signed with OpenPGP


Re: XPath jcr:contains(.,\"value\") exlude one or more Properties

2017-02-04 Thread ZeroCool86
Hi,

thanks for your response. I know this normal search pattern in a specific 
property.
I was hoping there is something like a blacklist -> exclude one property but 
search all others without name theme explicit. It seems not ;-)

Greetings,
Michael