-->
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: TikaBridge problem (4.2.0 beta 2)
PostPosted: Fri Nov 23, 2012 9:16 am 
Newbie

Joined: Fri Nov 23, 2012 9:01 am
Posts: 2
Hello,

I am using the new experimental feature annotation @Tikabridge.

I have an entity (parent) which can contains multiple childs. These childs are annotated in the parent entity with @IndexedEmbedded.

Also, the childs contains a String reference to a file, annotated with : @Column(name="DOC_PATH"),@Field and @TikaBridge. The reference to the parent is annotated with @ContainedIn.

When I index the parent entities (and the embedded childs), it works fine and I can search Lucene with Luke and find the indexed documents.
Although, when I try to search the parent entity with search it throws an exception. here is my code :

Query parentQuery= IInQB.keyword().
onField("reference").
andField("childs.docPath").
andField("numero").
matching(s.toLowerCase()).createQuery();

The execution throws this exception :
"org.hibernate.search.SearchException: FieldBridge class org.hibernate.search.bridge.builtin.TikaBridge does not have a objectToString method: field childs.docPath in Parent

How can I solve this problem?

Thanks!


Top
 Profile  
 
 Post subject: Re: TikaBridge problem (4.2.0 beta 2)
PostPosted: Tue Nov 27, 2012 8:17 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
I'm not sure: assuming your mapping and property names are correct I would expect that to work, but I couldn't find a unit test to verify this case. Could you open a JIRA issue please [1] ? Even if it's not a bug I think we would need to add such a test. Would you like to contribute a test? I can provide you some pointers for that.

1 - https://hibernate.onjira.com/browse/HSEARCH

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: TikaBridge problem (4.2.0 beta 2)
PostPosted: Sat Dec 22, 2012 7:14 am 
Newbie

Joined: Fri Nov 23, 2012 9:01 am
Posts: 2
I have tried with a simpler model with no success.
My mapping and property names seems correct.

I can contribute with a test but have no idea where to start, so pointers are welcome!


Top
 Profile  
 
 Post subject: Re: TikaBridge problem (4.2.0 beta 2)
PostPosted: Sat Dec 22, 2012 8:03 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
the most important step is to open an issue on JIRA to track the problem, where you can describe how to reproduce it, and maybe paste a nicely formatted stack trace.

Then if you want to contribute a unit test that's even better (but we still need a JIRA to not forget about it); we wrote some guidelines here:
https://community.jboss.org/wiki/ContributingToHibernateSearch

The best way to get an idea of how a test could be organized is by looking in the source code: each module has several tests and make use of helpers and utilities we wrote to simplify testing code.

_________________
Sanne
http://in.relation.to/


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.