I am using Alfresco Rest API (/alfresco/api/-default-/public/search/versions/1/search)
I perform the following search:
{
"query": {
"query": "WOOF:((H) (A minor) (Anor))"
},
"defaults": {
"defaultFTSOperator": "AND",
"defaultFTSFieldOperator": "OR"
},
"templates": [
{
"name": "WOOF",
"template": "(%content OR %cm:title) AND TYPE:content"
}
]
}And I get like 200 results, but if I search the same: (H) (A minor) (Anor) in Alfresco Share ,I get about 500 results. I found that it does something like this:
{
"query": {
"query": "((WOOF:(H)) (WOOF:(A minor)) (WOOF:(Anor)))"
},
"defaults": {
"defaultFTSOperator": "AND",
"defaultFTSFieldOperator": "OR"
},
"templates": [
{
"name": "WOOF",
"template": "(%cm:content OR %cm:title) AND TYPE:content"
}
]
}(Note: I know that Alfresco Shares uses an internal API/slingshot and that's why there are variations, so I am trying to kind of duplicate its behavior).
So, the previous query gives me the results that I am looking for, but to accomplish that, I had to add the WOOF template as prefix of each term.
Is there a way to achieve this without adding the template per term? because the user its just going to type: (H) (A minor) (Anor) and what I expect, is the outcome of this last query.