> Ive just got a couple of questions which i cant quite work > out...wondered if > someone could help me with them: > > 1. What happens if i make a backup (copy) of an index while documents > are > being added? Can it cause problems, and if so is there a way to > safely do > this?
You should be okay. When new documents are added, they are added to new segments. A 'table of contents' of all valid segments is in 'segments' file. Even if you copy extra segments, your index will still work, it's just that your searches may not search newly created segments, whose existence was not registered in segments file, when you copied the index. > 2. When I create a new IndexSearcher, what method does Lucene use to > take a > 'snapshot' of the index (because if i add documents after the search > object > is created they dont appear in the search results)? This is related to the answer under 1. New documents are not seen with an old IndexSearcher, because the old IndexSearcher is not aware of new segments. It would have to re-read the segments file and read any new segments found, in order to become aware of new segments and documents in them. Otis --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
