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

Ulf Dittmer commented on JSPWIKI-893:
-------------------------------------

The easiest way to solve this would be to filter out the sequence "__" before 
indexing. In LuceneSearchProvider.indexPages replace

{{field = new Field( LUCENE_PAGE_CONTENTS, text, TextField.TYPE_STORED ); }}

with

{{field = new Field( LUCENE_PAGE_CONTENTS, text.replaceAll("__", ""), 
TextField.TYPE_STORED );}}

> Cannot search for bold words with GermanAnalyzer
> ------------------------------------------------
>
>                 Key: JSPWIKI-893
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-893
>             Project: JSPWiki
>          Issue Type: Bug
>    Affects Versions: 2.10
>            Reporter: Arend v. Reinersdorff
>            Priority: Major
>
> Reproduce:
> * in jspwiki-custom.properties set
>    {{jspwiki.lucene.analyzer = org.apache.lucene.analysis.de.GermanAnalyzer}}
> * in a wiki page include {{\_\_mysearchterm\_\_}}
> Result:
> * Searching for {{mysearchterm}} doesn't find the text
> * Searching for {{\_\_mysearchterm\_\_}} finds the text
> Expected:
> Searching for {{mysearchterm}} should find the text, as it does with 
> {{org.apache.lucene.analysis.standard.StandardAnalyzer}}
> See also the thread on the mailinglist:
> http://mail-archives.apache.org/mod_mbox/jspwiki-user/201506.mbox/%3CCAJCBYx0M_Xqm1jt8Pr466rRb8sLLLf28eygn9FrA4%3Dhrb6aHeg%40mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to