cancel
Showing results for 
Search instead for 
Did you mean: 

Solr 6 indexing lag

ivanovpavel1983
Champ on-the-rise
Champ on-the-rise

The problem is that files are not appearing in searches that are performed immediately after the file is uploaded.

How can I reduce this lag?

Are there any settings for this?

Alfresco version ==> 6.1.

Solr6 ==> Alfresco-Search-Services 1.3.0.1.

1 ACCEPTED ANSWER

cesarista
World-Class Innovator
World-Class Innovator

Well, this is not a bug (it's a feature). 

SOLR works asyncronously, doing batches for indexing 1000 documents each 30 seconds (the numbers depend on Alfresco and SOLR version). So normally, the content is not indexed once uploaded, and you need to wait a little bit. It is called eventual consistency. It is not a real problem for a collaborative case, but other situations (for example a CMIS application with transactional requirements), you may need to enable transactional metadata queries.

Regards.

--C.

View answer in original post

3 REPLIES 3

cesarista
World-Class Innovator
World-Class Innovator

Well, this is not a bug (it's a feature). 

SOLR works asyncronously, doing batches for indexing 1000 documents each 30 seconds (the numbers depend on Alfresco and SOLR version). So normally, the content is not indexed once uploaded, and you need to wait a little bit. It is called eventual consistency. It is not a real problem for a collaborative case, but other situations (for example a CMIS application with transactional requirements), you may need to enable transactional metadata queries.

Regards.

--C.

afaust
Legendary Innovator
Legendary Innovator

The frequency / interval of indexing can be configured in all Alfresco SOLR / Search Services versions. I believe 15 seconds is actually the default, not 30 seconds - but in any case, Cesar's answer is correct.

francesco_forna
Confirmed Champ
Confirmed Champ

Hi,

you have to send queries that are full compliance with the transactional metadata query engine (Overview of transactional metadata query | Alfresco Documentation ) so they are evaluated directly from the DBMS. As Cesar Capillas‌ said the SOLR engine works asyncronously.