Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Search not working

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I would like to install JForum on my intranet. JForum has a nice clean look and fast - great job!! Everything seems to work except I have not been able to get the search function working. I have not installed the CVS version yet. Do you have any suggestions?

I am using Weblogic 8.1
MySQL v4.1.9
Java 1.4.2_05

thanks,
Jon

[originally posted on jforum.net by jcoppert]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hhmm.. the search is a bit unstable, but it was supposed to work. Maybe this is another problem related to mysql 4.1 (just a guess). Please see if jforum_search_words and jforum_search_wordmatch have any records.
The code which handles that is src/net/jforum/drivers/generic/SearchModel.java.

There are some people trying to integrate Lucene with jforum, but I still don't have a date, since most of the code is for test purposes so far.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the pointers. I checked the tables and they appear populated correctly. If the search works like it does here I'm happy for now! I haven't had much chance to look at the code yet.....
[originally posted on jforum.net by jcoppert]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is there any improvements on this point?
Seems that problem still exits in Tomcat 4.1, MySql 4.1.9 and JForum 2.1

Jon, did you found any solutions?

Thanks in advance,
Gleb

p.s. jforum_search_words and jforum_search_wordmatch populated well :?

?�?��?�?�?�?�?�
[originally posted on jforum.net by gst]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tested it using mysql 4.1 and it is working for me. If some of your guys are able to debug the application, it will help a lot, since I cannot reproduce the bug.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, yes, indeed. It does not work well with cyrillic chars. I have no official fix for it so far.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like it fails with unicode chars but it definatelly works with ascii.

When I'm trying to find some cyrillic text (I added some in my prev message) it returns nothing - even this jforum.net version ;)
[originally posted on jforum.net by gst]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mysql 4.1.x tomcat 5.0.x jforum 2.1.3

the same trouble occured.

maybe it need call method getBytes()
i will try it later.
[originally posted on jforum.net by cnticws]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

Any progress on making search to work with unicode? (It fails not only with cyrillic, it can't find for example "esṭo" from https://coderanch.com/t/574757 ;) )

Rafael, do you have an idea on where to start looking?

Thanks,
Gleb
[originally posted on jforum.net by gst]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Once someone said that chaning the code



to



in src/net/jforum/drivers/generic/SearchModel.java

would fix the bug. You can try it.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep... that's our guy ! :P

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that someone is me.
see this post for detail
https://coderanch.com/t/574739
[originally posted on jforum.net by andowson]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the tip, but I believe described solution is not for my case, because I have jforum_search_words populated OK
(and also I want to searh on existing posts ;) )

I'm almost sure that it is something with text encoding.
I tried to debug and outputted to the system console pm.getPost().getText() from PrivateMessageAction and kw from SearchAction.
When using the same word in both cases console output looks different, i.e. text is encoded differently.

UPD. He-he... The difference between search action and other actions like private message is that search form uses GET method!


[originally posted on jforum.net by gst]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not rely on the console output because console encoding is different for web, specially on Windows.

Maybe it's a problem with the query, which use LIKE / = 'xxx' to check for matches. For me is virtually impossible to test it. I can guide you to the source code, if you want.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I understand the problem is that when submitting form data by GET, search string gets encoded with default ISO-8859-1 rather than supplied content charset (which is correct in POST case).

This code change in SearchAction helps:


to


My search is working now

Cheers,
Gleb
[originally posted on jforum.net by gst]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Btw, Rafael, you mentioned

Probably I'll put some configuration option to these issues.. something like "search.index.all.words" and "seach.use.like".



Is this planned for the next release? ;)
[originally posted on jforum.net by gst]
 
Hug your destiny! And hug this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic