[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-477) Support for the new Solr's character filters

G Fernandes (JIRA) noreply at atlassian.com
Wed Mar 31 19:29:31 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

G Fernandes updated HSEARCH-477:
--------------------------------

    Attachment: solr14-2.patch

Attached is a patch to support Solr's CharStream. A new kind of filter factory was introduced to AnalyzerDef: 

{code}
public @interface AnalyzerDef {
	String name();
	TokenizerDef tokenizer();
	TokenFilterDef[] filters() default { };
      +CharFilterDef[] charFilters() default { };
}
{code}

Being a new annotation defined as:

{code}
public @interface CharFilterDef {
    public abstract Class<? extends CharFilterFactory> factory();
    public abstract Parameter[] params() default {};
}
{code}


That will allow the usage of MappingCharFilters as requested by the users:

https://forum.hibernate.org/viewtopic.php?f=9&t=1002465

> Support for the new Solr's character filters
> --------------------------------------------
>
>                 Key: HSEARCH-477
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-477
>             Project: Hibernate Search
>          Issue Type: Improvement
>          Components: analyzer
>            Reporter: Gustavo Fernandes
>            Priority: Minor
>         Attachments: solr14-2.patch
>
>
> Solr 1.4 introduced CharacterFilters [1], which are based on Lucene's CharStream. Those filters are currently incompatible with the annotation @TokenFilterDef, which accept only TokenFilterFactories:
> {code}
> public @interface TokenFilterDef {
> 	public abstract Class<? extends TokenFilterFactory> factory();
> 	public abstract Parameter[] params() default { };
> {code}
> Onde ideia is to keep the same annotation, "generalize" the token filter factory type in the annotation, and on SolrAnalyzerBuilder construct a TokenizerChain which will accept both type of filters [2]
> [1] http://lucene.apache.org/solr/api/org/apache/solr/analysis/CharFilterFactory.html
> [2] http://lucene.apache.org/solr/api/org/apache/solr/analysis/TokenizerChain.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list