cancel
Showing results for 
Search instead for 
Did you mean: 

How to Query Historical Document Versions by Custom Metadata ?

med
Confirmed Champ
Confirmed Champ

I’m using ACS 25.3 with Search Enterprise 5.3 and Elasticsearch.

I have a requirement to query previous document versions based on custom metadata using AFTS.

For example, I would like to search for documents based on a custom property and retrieve matching historical versions of those documents, rather than only the current version.

Is this possible using AFTS? If so, what would be the appropriate query syntax or approach to achieve this?

2 REPLIES 2

angelborroy
Community Manager Community Manager
Community Manager

Version store is not indexes in Elasticsearch.

Try db-afts syntax, that uses directly the database. 

https://docs.hyland.com/r/Alfresco/Alfresco-Search-Enterprise/5.3/Alfresco-Search-Enterprise/Configu...

Hyland Developer Evangelist

med
Confirmed Champ
Confirmed Champ

Thanks for the suggestion. I understand that the Version Store is not indexed in Elasticsearch and that db-afts can be used to query the database directly.

However, I noticed something in the API Explorer documentation for the Search API regarding the Request Scope.It states that, in addition to the default nodes location , the search scope can be set to versions or deleted-nodes.

For example:       "scope": { "locations": ["versions"] }

This seems to indicate that the search API can target the version Store explicitly ?? could custom metadata on historical versions be queried this way ?