You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2013/09/18 17:11:55 UTC

[jira] [Commented] (OAK-1022) Add a custom Oak Lucene analizer

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

Alex Parvulescu commented on OAK-1022:
--------------------------------------

In with rev 1524443:
 - added custom analyzer OakAnalizer based on lucene's StandardAnalyzer plus an oak filter
 - copied over lucene's CompoundWordTokenFilterBase, added the option to skip the current token
 - added filter that splits aplhanumeric tokens on '_' and '.'
 - tests

                
> Add a custom Oak Lucene analizer 
> ---------------------------------
>
>                 Key: OAK-1022
>                 URL: https://issues.apache.org/jira/browse/OAK-1022
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: oak-lucene
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>
> Following OAK-1007 where I switched to a ClassicAnalizer, I realized that it introduced some subtle changes in tokenization behavior.
> For example there's a twist if the token contains a number.
> From the ClassicTokenizer api:
> bq. Splits words at hyphens, unless there's a number in the token, in which case the whole token is interpreted as a product number and is not split.
> this means that a path token could be split either in 2 tokens if it has no numbers:
> {code}
> /parent/child => 'parent', 'child'
> {code}
> or just one if it has numbers:
> {code}
> /p12345/p23456 => '/p12345/p23456'
> {code}
> Also, I'd like to split alphanumeric tokens on '_' and on '.' as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira