I like Kevin's runtime.xml idea, however it may impose problems when the product is upgraded, database moved, runtime.xml modified by hand, lost, etc. #1 isn't pretty but it guarantees that the index file will be re-read. Or both solutions could be combined
Bob -----Original Message----- From: Kevin Ross Sent: Friday, June 27, 2003 12:31 PM To: [EMAIL PROTECTED] Subject: FW: [Bug 21055] - Indexes are not recognized after reboot If anyone has feedback on Bob's potential solutions, please speak up. I would say, let's not alter the system.xml, but add a runtime.xml in the same directory, which maintains the runtime information for the indexes (and anything else) for this instance. Much the same way the Eclipse IDE uses the metadata directory. The runtime.xml would of course need to be generated on first startup. Thoughts? Kevin Ross http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21055 ------- Additional Comments From [EMAIL PROTECTED] 2003-06-27 17:51 ------- 1. While stepping through the code, I realized that there is no mechanism for discovering existing index files. During startup, IndexerManager searches for the "index" nodes in the configuration file if none is found it happily ignores any index files that already exist on the disk. 2. Now, moving to the creation of an index - list of the existing indexes is obtained from the Configuration object driven by system.xml. Because of #1 - list is empty and the IndexManager happily creates the index again and stores it on disk. It also adds the child "index" node to the configuration. However, this updated configuration is never persisted back to the system.xml, and after reboot the index node is lost. I'm not attempting to fix this because I don't know how this was envisioned. I see two possibilities: 1. Add code that searches the file system for the index files and updates the Configuration accordingly. 2. Overwrite the system.xml file on index add/remove Please advice, Bob Stone