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

Siegfried Ehret s.ehret at eurelis.com
Mon Oct 15 14:05:18 CEST 2012


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
> 
> 
> 
> 



More information about the opencms-dev mailing list