Another question is if I can delete document based on storyIndentity field ( using IndexReader.deleteDocuments(term)). Since storyIdentity field is not indexed, is there any performance issue or I should index it too (and store it)?
As to your very last question, No, there'll be no performance penalty. That's because there won't be any docs deleted <G>....
From the javadoc (2.1) for IndexReader.deleteDocuments(Term)
" Deletes all documents that have a given term indexed." You may be ahead if you index it UN_TOKENIZED though since indexing it tokenized could lead to "interesting" results. Say you have three of these IDs. "this is id1" "this is id2" "this is id3" Things would be fine if your terms were "id1", "id2", or "id3". But if your term were "this", you would remove all your documents if you indexed the identity TOKENIZED because "this" is a term in all three docs for the identity field. And to add to Otis's comment, optimizing is a pretty expensive step in my experience... Best Erick