Hi,
Sorry for being so dull here, but I just can't see where I'm going wrong...
I have things persisting nicely to hibernate, and getting indexed.
However, I am now trying to map a simple java.lang.String set so that I can query against elements in the set.
The relevant bit of code looks like this:
Code:
@org.hibernate.annotations.CollectionOfElements
@JoinTable(name="videoassettag",joinColumns=@JoinColumn(name="videoassettagid"))
@Column(name="tagname", nullable=false)
@Field(index=Index.UN_TOKENIZED, store=Store.NO)
private Set<String> tags = new HashSet();
This gives me this stack:
Code:
Caused by: org.hibernate.search.SearchException: Unable to guess FieldBridge for tags
at org.hibernate.search.bridge.BridgeFactory.guessType(BridgeFactory.java:180)
at org.hibernate.search.engine.DocumentBuilder.bindFieldAnnotation(DocumentBuilder.java:321)
Which makes sense, but I'm not clear on what fieldbridge I'm supposed to be using, or even if that is the correct method. Can't see an example in the ref. guide.
I've tried using @IndexEmbedded, but that didn't help (didn't get an exception, but didn't index the set either).
Many thanks for any light you can shed on this,
James.