I am using AQL (Documentum REST 7.3) to do an xplore search against the repository.
With the below AQL send as an input to the search service (POST), I get 9 results -
{
"all-versions": false,
"include-hidden-objects": false,
"types": [
"my_type"
],
"columns": [
"object_name",
"r_creation_date",
"r_creator_name"
],
"sorts": [
{
"property": "object_name",
"ascending": true
}
],
"repositories": [
"corp"
],
"expression-set": {
"expression-type": "expression-set",
"operator": "AND",
"expressions": [
{
"expression-type": "fulltext",
"value": "opentext",
"fuzzy": false
}
]
}
}
If I were to AND another attribute (email_from) in the AQL, the result count reduces to 1.
{
"all-versions": false,
"include-hidden-objects": false,
"types": [
"my_type"
],
"columns": [
"object_name",
"r_creation_date",
"r_creator_name"
],
"sorts": [
{
"property": "object_name",
"ascending": false
}
],
"repositories": [
"corp"
],
"expression-set": {
"expression-type": "expression-set",
"operator": "AND",
"expressions": [
{
"expression-type": "fulltext",
"value": "opentext",
"fuzzy": false
},
{
"expression-type": "expression-set",
"operator": "AND",
"expressions": [
{
"expression-type": "property",
"name": "email_from",
"operator": "CONTAINS",
"value": "abc",
"exact-match": false,
"repeating": false,
"case-sensitive": false,
"fuzzy": false
}
]
}
]
}
}
So far, everything is as expected. However, instead of AND-ing the additional attribute (email_from), if I were to do an OR, the result count still remains 1.
"all-versions": false,
"include-hidden-objects": false,
"types": [
"my_type"
],
"columns": [
"object_name",
"r_creation_date",
"r_creator_name"
],
"sorts": [
{
"property": "object_name",
"ascending": false
}
],
"repositories": [
"corp"
],
"expression-set": {
"expression-type": "expression-set",
"operator": "AND",
"expressions": [
{
"expression-type": "fulltext",
"value": "opentext",
"fuzzy": false
},
{
"expression-type": "expression-set",
"operator": "OR",
"expressions": [
{
"expression-type": "property",
"name": "email_from",
"operator": "CONTAINS",
"value": "abc",
"exact-match": false,
"repeating": false,
"case-sensitive": false,
"fuzzy": false
}
]
}
]
}
}
Shouldn't the result count be 9 or more, since in this AQL my query is to get the documents where either 'fulltext' is 'opentext' OR 'email_from' property is 'abc'? So, the result count shouldn't be less than the result when querying for 'fulltext' as 'opentext'.
Is AQL not being generated correctly on this scenario?