This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JForum and the fly likes Recreating Search Index Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » JForum
Reply Bookmark "Recreating Search Index" Watch "Recreating Search Index" New topic
Author

Recreating Search Index

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I'm having an issue recreating the Lucene Search index. I have tried creating it using ID and with date and neither seem to work. I'm using jforum 2.1.8 on OC4J 10.1.3 and an oracle 10g database. When I redeploy the application I lose my entire search index and I need to have the ability to recreate it.

I have updated the oracle.sql file to have the correct syntac for the SearchModel.firstPostIdByDate



When I go to do the reindex, I get post results back and to the list on line 154 of net.jforum.search.LuceneReindexer



But it seems like the results never get put into the index.

When I create a new post it does get put into the index.

Any input would be great.

[originally posted on jforum.net by bmcguire]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Also I forgot to mention that I'm running on java 5. I was able to solve the issue I was having. When the batchCreate method in net.jforum.search.LuceneIndexer is called the added documents were never being commited to the IndeWriter (ramWriter). I ended up updating the batchCreate and createRAMWriter methods.

I updated batchCreate to do a flush after the document was added to the ramWriter



Also I updated the createRAMWriter method to create the IndexWriter with a different Constructor that sets autocommit to true (JavaDoc)


[originally posted on jforum.net by bmcguire]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Recreating Search Index
 
Similar Threads
Quartz indexer
Reindex
Create a new index from scratch with date
Clarification of Servlet life cycle
Lucene Reindex