cancel
Showing results for 
Search instead for 
Did you mean: 

Smart folder query

wity
Confirmed Champ
Confirmed Champ

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

andy1
Star Collaborator
Star Collaborator

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 answer in original post

1 REPLY 1

andy1
Star Collaborator
Star Collaborator

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

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.