-->
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: Domain Search and Document Search
PostPosted: Thu Dec 18, 2008 4:13 pm 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
I would like to develop a one search solution that enables me to search across domain object (using Hibernate Search) and documents (pdfs, rtfs, etc) using native Lucene. I would like to have a Search Manager that uses MultiSearcher to search across all data.

I am not sure if this is the right approach, I'm not sure what I should to return..do I return Document objects and/or domain objects.

I would be grateful if someone might be able to advise me on what approach I should take.


Again any help would be appreciated!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2008 4:54 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
You are probably going to store the pdfs and all in a database anyway,
so if you map them as BLOB fields of some entity, you can create a hierarchy of entities and add all attributes you'll need in the presentation layer.

You can map the BLOB analyzers declaratively using Hibernate Search, and use the existing ones from the Lucene project's contributions.

You may want to think about what your presentations layer needs first: a generic interface is desirable IMHO.

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2008 5:52 pm 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi

Thanks for your quick reply! The documents are not stored in the database. These documents are attachments that users upload to a document repository.

I guess I could return either a document summary (link to document) and return domain object.

Not sure if I have provided enough information, I am preparing a proposal and I want to make sure I know what I;m talking about!


Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 4:26 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
even if the documents are not stored in the database, you may want to have some metadata stored in the database, such as the link and/or path to the resource. This way you can still define your own Search Bridge to provide custom file format management.
I would still recommend to make sure all types returned by your search have something in common, can be an interface or a common supertype, to make sure you don't have to code different views to show the results.
You should read the book, it is plenty of examples helpful for this situation.

If you prefer you may access the indexes with Lucene's API, which is exposed through Hibernate Search, but you should not use it to make changes to the index. Of course you may want whatever you want with indexes not directly managed by H.S.

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 22, 2008 8:56 am 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi

Thanks for your valuable advice. I have already taken some of them into account. I will create a Summary interface which will be returned from different search components. The SearchManager will return a SearchResponse which contains the list of summary objects.

We have a interesting xml requirement which is stored within a Domain object (not very happy with this) but I will create a Custom class brigde that would take the xml and values and index these.


Cheers


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.