-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: h-search: Dynamic selection of analyzer (not analyzerdef)
PostPosted: Thu Sep 19, 2013 4:15 pm 
Newbie

Joined: Thu Sep 19, 2013 4:08 pm
Posts: 1
I can dynamically select an @AnalyzerDef using an AnalyzerDiscriminator as described here: https://docs.jboss.org/hibernate/search/4.1/reference/en-US/html/search-mapping.html#d0e3825

But I do not need an AnalyzerDef. I just want to dynamically select between GermanAnalyzer (for german content) and StandardAnalyzer (for english content).

How I can I do this? Is there something similiar to dynamically select between those pre-defined analyzers?

Here is a very simplified version of my entity:

Quote:
@Indexed(index = "myindex")
@Entity
public class Book {

@Id
private id;

// This property can be used to get the current language of the entity.
@Column
private String languageCode;

// This property has to be analyzed languaged dependent.
@Column
@Field(analyze = Analyze.YES, store = Store.NO, index = Index.YES)
@Boost(2.0f)
private String text;

// ...
}


Thanks in advance for any help

Thomas


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.