[ 
https://issues.apache.org/jira/browse/JSPWIKI-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672745#action_12672745
 ] 

Janne Jalkanen commented on JSPWIKI-501:
----------------------------------------

Cut'n'paste from mailing list:

<snip>

I had the same issue and I usually patch the soft I use the following way:

public final class MyTokenizer extends CharTokenizer
{
/**
    * Construct a new LowerCaseTokenizer.
    */
   public DSTokenizer(Reader in)
   {
       super(in);
   }

   protected char normalize(char c)
   {
       return Character.toLowerCase(c);
   }

  /**
   * Collects only letters, digits and "_"
   */
   protected boolean isTokenChar(char c)
   {
       return (c=='_') || Character.isLetterOrDigit(c); // '_' is accepted to 
link two words together
   }
}

Cheers,

Christophe

> Search Cannot Find Terms With Underscores
> -----------------------------------------
>
>                 Key: JSPWIKI-501
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-501
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.8.1
>         Environment: Red Hat Linux
>            Reporter: Stefan Bohn
>            Priority: Minor
>
> http://www.jspwiki.org/wiki/BugSearchCannotFindTermsWithUnderscores
> I want to re-open this bug.
> We have many pages with a underscore in the pagename. These pages could not 
> be found with Lucene, when the underscore is entered in the searchbox.
> Example:
> Pagename: Page_WithUnderscore
> Searchstring: Page* - search is ok
> Searchstring Page_* page is not listed in the search result
> Is this a bug, or must I change the search string, because of Lucene?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to