How to query a custom model document by property from version store in alfresco?

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

How to query a custom model document by property from version store in alfresco?

I want to query old version document by search service. I have used store ref as "workspace://version2Store" in alfresco webscript. But it not working. By default , we can search latest document using fts-alfresco which is available in spacesstore. That same thing , i need in version store also. How to query using webscript? Please guide me.  

5 Replies
cesarista
Customer

Re: How to query a custom model document by property from version store in alfresco?

Hi:

You may try in node browser for example (selecting the corresponding store), or via Javascript API in JS Console too:

query | Alfresco Documentation 

Regards.

--C.

afaust
Master

Re: How to query a custom model document by property from version store in alfresco?

Bear in mind that the version store is by default not indexed using SOLR, so the only queries you will be able to make need to be compatible with TMQ (transactional metadata query), i.e. executable against the database. This is also dependent on the Alfresco version, with initial support added in 4.2, and further enhancements in 5.1

manikandaprabus
Member II

Re: How to query a  custom model document by property from version store in alfresco?

Yes. I have tried by using alfresco Node Browser and using webscript also. But I not get any result by that service.

manikandaprabus
Member II

Re: How to query a  custom model document by property from version store in alfresco?

Yes. By default version store is not indexed by SOLR. How to achieve index version store using TMQ in alfresco?  I need version store index for some specific custom model only. I am using 5.2 community edition. Kinldy help me.

afaust
Master

Re: How to query a  custom model document by property from version store in alfresco?

You do not need an index for TMQ - that is the whole point. Simply write a query that can be executed against the DB. Read up in the documentation what that means, or take a look at a presentation of mine from BeeCon (video / slides).