• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Recreating Search Index

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

should be:
 
Saloon Keeper
Posts: 6516
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The current version of JForum uses a very different query. Which JForum version are you looking at? If you're using an older version, you should upgrade to the latest one available from https://sourceforge.net/projects/jforum2/files/?source=navbar
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic