cancel
Showing results for 
Search instead for 
Did you mean: 

Search latency when saving a doc

simonsimonson
Champ in-the-making
Champ in-the-making
I notices a a significant latency after creating a document on the share before that document can be found in a IN_TREE search. The doc can be found straight away if you define the type and search param without the IN_TREE clause. so for example I have a doc of type cmpdl:companyCustomer, and I create it in the repo.
Then I run a search like:

SELECT cmisSmiley SurprisedbjectId from cmpdl:companyCustomer where IN_TREE(?)
and this type of search usualy takes 2-10 seconds to return the new document to the list.
where as if i specify the search like
SELECT cmisSmiley SurprisedbjectId from cmpdl:companyCustomer where cmpdl:firstName = ?
it returns the result straight away.

The interesting thing is that sometimes the first search returns the result straight away sometimes it might take up to 10 seconds to succeed. Is there any configuration or workaround that can be applied in this case?
2 REPLIES 2

rjohnson
Star Contributor
Star Contributor
The indexing in Alfresco is asynchronous and the indexer runs every 10 seconds so there will be an average delay of 5 and a bit seconds between a document being added and it being indexed. It could be emuch longer under heavy load or with lots of document additions.

Alfresco can also use a thing called "intransaction indexing" if you have it enabled and use the appropriate query subset. This uses the database not Lucene (Solr) and so it much more "instant".

There is little you can do about the latency but you can try and use query syntax & languages that exploit "in transaction indexing".

There is some explanation of the subset in these forums.

mrogers
Star Contributor
Star Contributor
And you should never need to search for a document you know is there.