I have tried to understand the following documentations:
https://docs.alfresco.com/content-services/6.2/develop/rest-api-guide/searching/
https://docs.alfresco.com/search-services/1.3/using/
I try to search for a compound expression: the document (or it's title, name, ...) contains 444840 OR 00444840 AND the exact term "Maklri Istvn Tams"
I try to use the POST API with a query:
curl --insecure -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' --header 'Authorization: Basic ***********' --data-binary '@query.json' https://devtest.****:8443 /alfresco/api/-default-/public/search/versions/1/search
and the query.json file is
{ "query": { "query":"(\"444840\" OR \"00444840\") AND =\"Maklri Istvn Tams\"" }, "fields":["id","parentId"], "paging": { "maxItems": "100", "skipCount": "0" } }
but with or without \" and = I can not get an useful result set. It breaks up "Maklri Istvn Tams" and finds the three tags, if I search for 1760000 it founds 1760020, etc.
Alfresco's faceted search shows promises:
8443/share/page/dp/ws/faceted-search#searchTerm=(444840 OR 00444840) AND "Maklri Istvn Tams"&scope=repo&sortField=null
gives only one result, which looks correct.
Is it possible to use the POST query to get the right results?
Alfresco Share v6.2.0 (r7791ffba8f0b22f1ef9fa25ba17400c4657068e3-b9, Aikau 1.0.101.19, Spring Surf 6.2.0, Spring WebScripts 7.10, Freemarker 2.3.28, Rhino 1.7.11, Yui 2.9.0-alfresco-20141223) Alfresco Community v6.2.0 (r05dbaf43-b368) schema 13001
Is
"query":"Maklri *(0) Istvn *(0) Tams"
the best way to search for an exact term in the content of documents?
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.