Hi,
first of all congratulation for the authors of this book. I have to summarize in 2 days in what HIBERNATE SEARCH can help me for my problem and I cannot read the whole book, so I just began to read it and I have a few preliminary questions.
Here is my problem : I work in a web application using Hibernate (and JSP, HTML, SPRING, JAVA) and we are looking for a technology that can resolve the following problem : We have a database with a lot of objects mapped to that database. The structure of the database is very complex. The interface to access the application is accessible to different users who have each their proper role in the application. For example, there is a role ARCHITECT, a role DESIGNER, a role ADMINISTRATOR etc.......Each user who connect in the application has his proper view of the model, that is, for example the ARCHITECT has a view on several (not all) Studies (object STUDY) , a part of group of Items of these studies (object ItemGroup), and a part of Items of these ItemGroups (object Item). This ARCHITECT has a view too on several (not all) sites ( object Site), and a view on a part (not all) of other users (not all users) (object USER). We are going to implement the following facility : This ARCHITECT may enter characters in a text box and as soon as he has entered more than (or equal to) 3 characters, and each time he has entered one more character, an ajax request is made to find all the accessible objects (he is allowed to access among “Study”, “ItemGroup”, “Item”, “Site”, “User”) which have their name or another of their property containing the entered characters (in the text box).
My question is : is HIBERNATE SEARCH adapted for this kind of research ? First of all I have doubts about the quickness of the answer, knowing that the research can be made on tens of objects and thousand of rows for each object. Does HIBERNATE SEARCH will help me to get an answer instantly ?
I have too two other questions :
1) I may enter for example “ant” in the text box. If I suppose there are three objects which have one of their property containing “avantage”, or “antenna”, or “accountant” I doubt that HIBERNATE SEARCH will help me to find these three words. Indeed I began to read the book and from what I understood, HIBERNATE SEARCH put an index on each word contained in a property. I suppose that HIBERNATE SEARCH can find the word “avantage”, the word “antenna” and the word “accountant” in a property but it cannot find the names containing “ant”. Can HIBERNATE SEARCH be helpful for this kind of research ? And if so, will the answer be as quick as if it was for a whole word ?
2) When I am going to make a research on an entered expression, I will have to make a first selection on the appropriate objects that for example the ARCHITECT is allowed to access : he is allowed to access only some of the studies and among these studies only some of the ItemGroup, and among these ItemGroup only some of the Item. Only after this pre-selection, I suppose that HIBERNATE SEARCH comes into play. But indeed, is it appropriate for HIBERNATE SEARCH ? I understood that HIBERNATE SEARCH can make a research on all the objects belonging to a Class, but is it possible to make a research on a set of pre-selected objects ?
Thank you for your reply in advance, I just began to read the book and I am not an expert, so I can’t answer to those first preliminary questions in two days. Your help will be precious.
|