AnsweredAssumed Answered

SOLR latency in Ent 4.1-Docs are NOT immediately searchable

Question asked by spitchaiah on Jan 18, 2013
Latest reply on Jan 18, 2013 by mrogers

We're using Alfresco Ent 4.1.2 with in-built Solr on Windows. We have created REST-ful web services for document upload, search actions,etc… and use custom content model. One of the main problems we're facing is that newly uploaded documents(via Rest calls) are not immediately searchable based on custom metadata. For eg: say EmpId is kind of Index/Primary attribute along with other attributes a document can have. As and when a document is uploaded, if we search by EmpId metadata(again Rest call) to get all docs associated with this EmpId, the newly uploaded/created document is NOT returned.

Seems like this is known latency issue with Solr Indexing in Alfresco but eventually they're consistent (needed in production mode). But we have users who will be doing a immediate search for the documents that they just uploaded(a common use case). I'm not sure of the best & scalable solution that'll resolve this issue & worth in production with huge document volume(about millions of docs getting added every month or so). I could think of:

1. Decrease the solr indexing interval(default 15s(?) to a lesser value say 5s) - but concerned about performance impact. Have seen about this ppty(alfresco.cron) Vs alfresco.lag
2. For all uploads, add a delay say 10s. Might be a bad idea for small size documents say 100kb but atleast docs will show up if the user tries to search after upload
3. Use lucene instead of solr for indexing or search. But I guess we'll lose the advantages of solr.

One important aspect is that we're not using full-text searches so I hope there's a better solution to this problem.

Your inputs are greatly appreciated!