A couple of questions:
- has this happened only after a certain number of files / a certain amount of time or has this been happening from the beginning ?
- the problem is that older or newer files are not found ?
- is there any similarity between the files which aren't being found (besides their age)
- did you try turning on DEBUG, to see if there are any suspicious messages ? Rebuild on startup = always + QUERY_INDEXES_REBUILT_SYNCHRONOUSLY = true should be equivalent to the manual workaround (although this is a very expensive operation for large amounts of data)
- This are happens after application works at least 2 days without restart. I have noticed above that every 1 minute this application put a new file into repository. But I think that actually this happens after certain amount of files, because after application restart I still can't find any files older than several days.
- The problem is that older files are not found.
- No. Only their age.
- Do you mean turn DEBUG in modeshape logging? This I not doing yet...
I know, that rebuild on startup always and rebuild synchronously a expensive operation, but this operations doesn't help me, so I let them by default.
((org.modeshape.jcr.api.Workspace)session.getWorkspace()).reindex("/");helps me. As I can see in application debug, modeshape for some reason don't do this at startup....