Hi,
we have just upgrade to Alfresco 5.0.2 (we had 4.1.6 version) to reduce the response time of our searches, because with millions of documents it becomes too low.
The main change is with the transactional queries, that search on DB instead of directly on Solr. But I need to confirm if I understand some concepts or not before I begin to develop.
1. At first, we need to activate it on alfresco-global.properties. By default, the value of solr.query.fts.queryConsistency is TRANSACTIONAL_IF_POSSIBLE. If I don't add this propery, my queries will do the search like TRANSACTIONAL_IF_POSSIBLE ¿Is ok?
To force the transactionality I need to put in my code
params.setQueryConsistency(QueryConsistency.TRANSACTIONAL);
Here is my first question… I don't know If I understand the difference between "TRANSACTIONAL" and "TRANSACTIONAL_IF_POSSIBLE". If I put "TRANSACTIONAL" in the solr.query.fts.queryConsistency all the queries (with the correct parameters) will execute like transacionals, but if I put "TRANSACTIONAL_IF_POSSIBLE" I need to set the setQueryConsistency? Is this the difference?
2. On the online documentation, in "Configuring an optional patch for upgrade" chapter says: "To enable the patch that adds the required indexes to the database, set the following property in the alfresco-global.properties file: system.metadata-query-indexes.ignored=false "
Is this property required to do the transactional queries? The "optional" confuses me.
And I need to specify somewhere the DB indexes that I need? Or these indexes are added automatically when we specify at the metadata xml model "index enabled=true"? Or are two difference things?
3. If I understand ok, the parameters that we use in query affect the transactional mode of the search. For example, if I use OR, the search not be transactional. Or if I use PATH do the same.
But if I use, por example, TYPE, search on DB fisrt and SOLR after if need it.
And search with a value of a own metadata defined at model.xml? Is transactional? Search for a value is considered full text search and goes directly to SOLR index?
Thanks for your time, I wait for your clarifications and hope that helps other users too.