Path queries - Path queries - Alfresco - Alfresco Search Enterprise - Alfresco/Alfresco-Search-Enterprise/4.2/Alfresco-Search-Enterprise/Using/Path-queries - 4.2 - 4.2

Alfresco Search Enterprise

Platform
Alfresco
Product
Alfresco Search Enterprise
Release
4.2
License
ft:lastPublication
2025-10-21T22:01:30.506000
ft:locale
en-US

The PATH field is the Elasticsearch field which contains the primaryHierarchy attribute that consists of a list of noderefs. Field indexing is different for re-indexing and live indexing components because they rely on different sources of information. The setup sequence for new systems is:

  1. RDBMS (re-indexing)

  2. Events (live indexing)

The live indexing component populates the PATH field on Elasticsearch documents starting from the primaryHierarchy attribute found in the node event. The primaryHierarchy attribute captures the primary hierarchy of ancestors of the resource affected, which means the folder path of the content. The first element is the immediate parent. For example this is a node event which contains that information:

{
  "specversion": "1.0",
  "type": "org.alfresco.event.node.Created",
  "id": "97c1b36c-c569-4c66-8a31-7a8d0b6b804a",
  "source": "/f6d21231-618e-4f12-a920-e498660c5b9d",
  "time": "2020-04-27T12:37:03.560134+01:00",
  "dataschema": "https://api.alfresco.com/schema/event/repo/v1/nodeCreated",
  "datacontenttype": "application/json",
  "data": {
   ...
      "primaryHierarchy": [
        "521aac1c-20eb-444b-a137-2da3d35ee1a8",
        "2641bbe1-39ff-44dc-b47f-736552ad46cc"
      ],
     ... 
    }
  }
}

During the first system bootstrap for new systems the initial folder hierarchy is created before the event subsystem is started. This means standard folders like Company home, Data dictionary, and Sites are not going to be picked up by the live indexing component. Due to this some members of the primaryHierarchy can’t be de-referenced. This occurs for new folders and documents that are created after the initial system start up, and because the live indexing component does not have enough information to construct the PATH field.

To overcome this scenario the recommended setup sequence for new systems that require PATH query functionality is:

  1. Startup new content repository.

  2. Perform full re-index

  3. Continue with live indexing.