wood burning stoves 2.0*
The moose likes JForum and the fly likes Lucene re-index problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Lucene re-index problem" Watch "Lucene re-index problem" New topic
Author

Lucene re-index problem

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
When re-indexing lucene, if there are a certain number of posts, for example 300 posts, the re-index function could process successfully. However, if there are only a few posts, for example 5 posts, the re-index failed whether by date or by message ID. After re-indexing, the Number of documents always displays 0 (if select "Recreate index from scratch"), and go to the lucene index folder, there was no any index files but 'segments.gen' and 'segments_1x'. Please give me any clue. Thanks a lot.
[originally posted on jforum.net by collin_chu]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
In the following post: http://www.coderanch.com/t/578196 #19543, bmcguire gave a solution for the problem of recreating search index. It can also resolve my problem. But I'm afraid that this solution would impact the re-indexing performance, especially when there are a large number of posts.
[originally posted on jforum.net by collin_chu]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Yeah, unfortunately, using Lucene was new with 2.1.8... and Raphael is the one who knows it best... but he's spending all his limited time on 3.0. Sigh.. we just probably should try to get some people together with time to create a 2.1.9 with critical patches... but...


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

Joined: Apr 22, 2012
Posts: 17424
Thank you, monroe, for taking time to look at my concern.
[originally posted on jforum.net by collin_chu]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
This bit me as well.

BTW of the two possible solutions for this:
1. This one - http://www.coderanch.com/t/578196 #19543,
2. This one - http://www.andowson.com/trac/jforum/ticket/6

The first one is way faster in all of my testing but it looks like the second solution is "preferred." Any idea why?

I've also found a secondary bug which is that if your first topic_id is > 50 then reindexing fails unless you set the start_Id as 50. The reason is because the code looks for posts in batches of 50. If the first one (1-50) returns no rows is exits without indicating a problem. Fix would be to change the firstPostId such that it gets the min ID from the jforum_topics table and if the number is higher than the user provided one uses that number.
[originally posted on jforum.net by chhum]
saverios mahmud
Greenhorn

Joined: Apr 26, 2012
Posts: 1
Hi,

Thanks for the answers, but both links:

http://www.coderanch.com/t/578196 #19543,
and
http://www.andowson.com/trac/jforum/ticket/6

seem to be broken. Any idea why?

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

saverios mahmud wrote:Hi,

Thanks for the answers, but both links:

http://www.coderanch.com/t/578196 #19543,
and
http://www.andowson.com/trac/jforum/ticket/6

seem to be broken. Any idea why?


The first one is down because jforum.net no longer has forums up. We've migrated their data. (We will look to see if there is anything we can do to help find the relevant links here more easily. In the meantime, I suggest searching this forum. We know the post is in it.

Andowson's domain is up so you can ask them about the broken link.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

Some progress. We now have a page that lists the mapping between all jforum.net URLs and coderanch URLs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Lucene re-index problem