Smart folder query

cancel
Showing results for 
Search instead for 
Did you mean: 
wity
Active Member II

Smart folder query

Jump to solution

Hello
I make smart folders and i don't know how write query.

I have three items.

TYPE --> xxSmiley Surprisedbchmlcenlivost
TYPE --> xxSmiley Surprisedbchobchodnidokument
ASPECT --> xxSmiley Surprisedbchtypdokumentuobchod:'Nabídka'

I want smart folder, where i will see all documents which have xxSmiley Surprisedbchmlcenlivost and xxSmiley Surprisedbchobchodnidokument without documents which have xxSmiley Surprisedbchmlcenlivost and xxSmiley Surprisedbchobchodnidokument and xxSmiley Surprisedbchtypdokumentuobchod:'Nabídka'.

Now my query looks like this: "query": "=TYPE:'xxSmiley Surprisedbchobchodnidokument' OR TYPE:'xxSmiley Surprisedbchmlcenlivost' AND NOT xxSmiley Surprisedbchtypdokumentuobchod:Nabídka"

And it doesnt work. Can anyone please help ?

1 Solution

Accepted Solutions
andy1
Senior Member

Re: Smart folder query

Jump to solution

Hi

As you have not included any bracketing of expressions they are getting combined in the default way which is not what you want. See Search for operator precedence | Alfresco Documentation.

The leading "=" is not required ( "=" binds to individual terms an not the whole query)
The only remaining catch is relater to the type hierarchy - do you want to find sub-types are not (if you have them).

You are constraining using a property value on an aspect (and not the aspect itself being applied).

So you just need to bracket the OR bits together .....

Andy

View solution in original post

1 Reply
andy1
Senior Member

Re: Smart folder query

Jump to solution

Hi

As you have not included any bracketing of expressions they are getting combined in the default way which is not what you want. See Search for operator precedence | Alfresco Documentation.

The leading "=" is not required ( "=" binds to individual terms an not the whole query)
The only remaining catch is relater to the type hierarchy - do you want to find sub-types are not (if you have them).

You are constraining using a property value on an aspect (and not the aspect itself being applied).

So you just need to bracket the OR bits together .....

Andy