-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Search problems
PostPosted: Sat Dec 15, 2007 1:25 am 
Newbie

Joined: Sat Dec 15, 2007 1:12 am
Posts: 2
Hi all,

I'm a beginner of Hibernate Search, a wonderful framework component!

I have a challenge and I don't know how to solve it:

I have a collection like this in the root class:

Quote:
@IndexedEmbedded
private Set<A> instances = new HashSet(0);



In class A, I have:

Quote:
@Indexed
public class A {

.......
@IndexedEmbedded
private B b;
.......

}


In class B, I have:

Quote:
@Indexed
public class B {

.......
@Field(index=Index.TOKENIZED, store=Store.NO)
private String aField;
.......

}



Why I cannot use this lucene field property instances.b.aField to retrieve all root class that has aField fits with condition search?

I have researched and read through hibernate search document but I can't find out the answer, please help me!

Thanks so much.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 15, 2007 9:54 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You have hit a small bug
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-140
there is a workaround described in the meanwhile.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 16, 2007 6:51 am 
Newbie

Joined: Sat Dec 15, 2007 1:12 am
Posts: 2
emmanuel wrote:
You have hit a small bug
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-140
there is a workaround described in the meanwhile.


Hi emmanuel,

Glad to be able to help. Actually, I used @IndexedEmbedded(depth=100) and @IndexedEmbedded(depth=3) but it till not runs.

Any idea?

Thanks

ps: This is what the lucene engineer was generated "[instances.b.aField:Distribution]"


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 16, 2007 6:59 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Don't forget that you need to reindex after this change.
Check your index structure with Luke and see if you have instances.b.aField field name in it.

I did not understand your PS, who is the Lucene engineer?

_________________
Emmanuel


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

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.