Alfresco Search API - search by tag/s

cancel
Showing results for 
Search instead for 
Did you mean: 
daizpuru
Member II

Alfresco Search API - search by tag/s

Jump to solution

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 Solution

Accepted Solutions
daizpuru
Member II

Re: Alfresco Search API - search by tag/s

Jump to solution

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 solution in original post

1 Reply
daizpuru
Member II

Re: Alfresco Search API - search by tag/s

Jump to solution

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.