Hello
I make smart folders and i don't know how write query.
I have three items.
TYPE --> xxbchmlcenlivost
TYPE --> xxbchobchodnidokument
ASPECT --> xxbchtypdokumentuobchod:'Nabídka'
I want smart folder, where i will see all documents which have xxbchmlcenlivost and xxbchobchodnidokument without documents which have xxbchmlcenlivost and xxbchobchodnidokument and xxbchtypdokumentuobchod:'Nabídka'.
Now my query looks like this: "query": "=TYPE:'xxbchobchodnidokument' OR TYPE:'xxbchmlcenlivost' AND NOT xxbchtypdokumentuobchod:Nabídka"
And it doesnt work. Can anyone please help ?
Solved! Go 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
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
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.