Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Search doesn't work after the crash

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to rebuild the search index? Can search old posts.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, there is a tool. We'll run it as soon as things cold down.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the tool included in the distribution? I want to make sure I have ways to recover in case this happen to my site.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rafael, looks like I am still not able to search old threads.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I know. I'm running out of time for the last weeks, so some tasks are being delayed.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rafael Steil wrote:Yes, there is a tool. We'll run it as soon as things cold down.

Rafael



hi Rafael-

Is that tool available? I need to rebuild the search index (it got screwed up).


[originally posted on jforum.net by MyJForum]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Rafael-

Is that tool available yet? We really need to rebuild the search index for about a million imported posts (not using API, but directly into the database).

Otherwise we are thinking about doing it ourselves, via the API SearchFacade.init(Post). Is that a realistic option, or is there a lot more to it?

Thanks in advance for a quick reply,
Dennis
[originally posted on jforum.net by Sumixam]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

You can download it from https://jforum.dev.java.net/source/browse/jforum/tools/searchIndexer/

If you encounter problems using it, let us know. In case of bugs, any help is welcome

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One manual method I used to recreate the search index was to do the following:

Notes: I am using the Quartz search implementation.

truncate the SEARCH_WORDMATCH and SEARCH_WORDS tables.

I then inserted a single record into SEARCH_WORDMATCH or SEARCH_WORDS -- I forget which one it was now.

I then watched the logs when the Quartz indexer started and the site was re-indexed for searching goodness.

E/.
[originally posted on jforum.net by ewise]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for the quick response Rafael! We'll be testing it today or maybe monday...
[originally posted on jforum.net by Sumixam]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

From the SearchIndexer.java i found:

I fixed a few things in the SearchIndexer.java(tool)

1. In insert query for jforum_search_words ,primary key word_id is not taken care .

2. Also sb.length() is not checked -hence indexoutofbounds exception

Once these r taken care..search is working fine,..BUT the numbers in the post are not indexed and hence search on a number in the post is not working..

[originally posted on jforum.net by rags]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rafael,

this tool is only usefull for non-oracle databases .


PreparedStatement posts = this.conn.prepareStatement("SELECT post_text AS text, post_subject AS subject, post_id AS id FROM jforum_posts_text limit 400")

will not work for oracle bcos in oracle, BLOB is the type for post_text in jforum_posts_text table
.

Do we have anything for oracle DB users?


[originally posted on jforum.net by rags]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please attach the fixed file here, so we can update the CVS? Thank you

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!