-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate.Search: Searching associated document
PostPosted: Thu Nov 22, 2007 7:41 am 
Contributor
Contributor

Joined: Sun Jun 26, 2005 5:03 am
Posts: 51
Location: London, UK
Say I have a domain object which has a filename property; this points at a PDF.

Can I structure the setup so that Hibernate.Search will automatically index the associated file and when I query I get the domain object back rather than the PDF itself?

_________________
Paul Hatcher
NHibernate Team


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 11:37 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
yes, by writing a custom FieldBridge, you basically can do everything in between the object model and the index structure, including streaming the data from a URL.
Interesting use case

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 12:31 pm 
Contributor
Contributor

Joined: Sun Jun 26, 2005 5:03 am
Posts: 51
Location: London, UK
Ok, so first I have to finish porting Hibernate.Search to NHibernate; then I'll write a custom bridge :-)

Would have thought it fairly common problem. We have a web site with articles/brochures on it, managed by a CMS - so you want to go to the page of owning entity rather than directly to the conent.

_________________
Paul Hatcher
NHibernate Team


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 1:48 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is a common problem, but how you extract data from your document is fairly business specific, hence no built-in solution.

BTW, check this out, it will probably be useful for you.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 2:47 pm 
Contributor
Contributor

Joined: Sun Jun 26, 2005 5:03 am
Posts: 51
Location: London, UK
Thanks that's most useful.

_________________
Paul Hatcher
NHibernate Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.