11-09-2017 02:45 PM
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 ?
11-10-2017 04:52 AM
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
11-10-2017 04:52 AM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.