cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Search API - search by tag/s

daizpuru
Champ in-the-making
Champ in-the-making

Hi Alfresco Community!

I'm trying to use the Public REST API  in order to search for content tagged with a particular set of tags using the following query:

POST http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search

{
  "query": {
    "query": "SITE:\"testSite\" AND TAG:\"testTag\""
  }
}

But the search does not return any data. As part of the example i've tagged in Alfresco Share a sample document with the tag "testTag" and checked throught the test api, and throught Alfresco Share that the node is correctly tagged:

GET http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/ce7f84a0-f494-423e-939...

{
    "list": {
        "pagination": {
            "count": 1,
            "hasMoreItems": false,
            "totalItems": 1,
            "skipCount": 0,
            "maxItems": 100
        },
        "entries": [
            {
                "entry": {
                    "tag": "testTag",
                    "id": "8dcf568e-4630-44ea-8282-ccdcbb944a80"
                }
            }
        ]
    }
}

¿Shouldn't my query return at least one result as there's currently one document tagged with "testTag"? ¿What am I doing wrong?

1 ACCEPTED ANSWER

daizpuru
Champ in-the-making
Champ in-the-making

I'd self-answer my question: turns out the alfresco core of SOLR6 was not current. After reloading the core the query i've posted up top worked perfectly.

View answer in original post

1 REPLY 1

daizpuru
Champ in-the-making
Champ in-the-making

I'd self-answer my question: turns out the alfresco core of SOLR6 was not current. After reloading the core the query i've posted up top worked perfectly.