[opencms-dev] Configure OpenCms Lucene / Analyzer / Stemmer to allow any substring in search

Mathias Lin mail at mathiaslin.com
Mon Oct 15 12:05:30 CEST 2012


Thanks Siegfried.
Of course that might work as well. I didn't think about it, even it's
so obvious. :)
Not using Lucene much....
M.



On Mon, Oct 15, 2012 at 8:05 PM, Siegfried Ehret <s.ehret at eurelis.com> wrote:
> Maybe using wildcards, like rewriting your query as securi* ?
>
> Regards,
>
> Siegfried
>
> On 10/15, Mathias Lin wrote:
>> Is there an easy way in OpenCms to configure the search / lucene that
>> a search by any substring of a string within a document would be
>> considered a match.
>>
>> For example, I have a document title like "Security Audit Briefing"
>>
>> Searching for:
>> "security" -> returns above document as a result
>> "secur" -> returns above document as a result
>> "securi" -> does NOT return above document as a result !!!
>>
>> I want the analyzer/stemmer to also allow 'securi' to be a valid search phrase.
>>
>> My current analyzer and stemmer is Snowball, which is already a bit
>> more flexible than the StandardAnalyzer, but I'd like it to accept any
>> matching substring, not just valid 'syllables':
>>
>>             <analyzer>
>>
>> <class>org.apache.lucene.analysis.snowball.SnowballAnalyzer</class>
>>               <stemmer>English</stemmer>
>>                 <locale>en</locale>
>>             </analyzer>
>>
>> Is there any very flexible analyzer/stemmer already available for
>> OpenCms and a way to configure it in opencms-search.xml ? Or do I need
>> to customize the underlying Lucene on a lower level?
>>
>> Thanks, M.
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>>
>>
>>
>>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>



More information about the opencms-dev mailing list