-
1. Re: Seam/hibernate search
gavin.king Mar 23, 2007 11:01 AM (in response to frippe)What's messy about it?
-
2. Re: Seam/hibernate search
epbernard Mar 23, 2007 4:54 PM (in response to frippe)What do you mean by messy?
-
3. Re: Seam/hibernate search
frippe Mar 26, 2007 4:14 AM (in response to frippe)I guess "messy" was the wrong word for this context. What I was referring to was; to day I need to combine the use of Seam annotations and functionality with hibernate sessions to get the indexing up and running. If would be nice to keep the code clean from hibernate sessions when it's not being used anywhere else in the same application.
What I was was hoping for was a Seam version or a very tight integration of the hibernate search. But perhaps I am hoping to much for Seam wonders in areas where I should make an effort myself.
//Frippe -
4. Re: Seam/hibernate search
milli Aug 16, 2007 3:36 PM (in response to frippe)Frippe,
I know it is kind of an old thread. Were you able to use hibernate search in seam? If so, could you provide information on how to configure it?
Is anyone else using hibernate search in seam? -
5. Re: Seam/hibernate search
vladimir.kovalyuk Aug 16, 2007 3:48 PM (in response to frippe)Milli
please check out dvdstore example that is shipped with seam 2.0beta1.
I remember seeing that it was configured in persistence.xml. -
6. Re: Seam/hibernate search
norman.richards Aug 16, 2007 3:50 PM (in response to frippe)A couple of the example apps use hibernate search. The dvd store uses it now, and the integration is relatively smooth. (though I must say I find the search syntax way to rigid)
-
7. Re: Seam/hibernate search
epbernard Aug 16, 2007 4:24 PM (in response to frippe)I think we should write a lucene query parser with a decent syntax and a seam context injection
If someone has ideas about the syntax, open a jira issue and write them down -
8. Re: Seam/hibernate search
christian.bauer Aug 16, 2007 5:28 PM (in response to frippe)I don't think query string parsers are the way to go. If I'm a user I don't want to learn another query syntax just because I want a "whole phrase" search or a simple AND. So any website that targets endusers (not something like JIRA) will have its own control boxes and dropdowns etc. on the search page.
So what we could do is come up with something like I did for the wiki, a small framework that makes it easier to build such search masks. -
9. Re: Seam/hibernate search
norman.richards Aug 16, 2007 6:10 PM (in response to frippe)I agree with Christian 100% on this. I don't want anything more complex than google. I can handle quotes, but anything more than that should be strictly for the power users. I particularly dislike the need to use "*" for partial matches.
-
10. Re: Seam/hibernate search
milli Aug 16, 2007 6:42 PM (in response to frippe)Thanks guys I will check out. Meanwhile after posting it here, I tried configuring it and I kind of got it working. But I will look in to the examples to see how it is done and used.
I still use 1.2.1 and examples for reference so I did not see it used anywhere. -
11. Re: Seam/hibernate search
matt.drees Aug 16, 2007 7:44 PM (in response to frippe)"christian.bauer@jboss.com" wrote:
So what we could do is come up with something like I did for the wiki, a small framework that makes it easier to build such search masks.
+1 -
12. Re: Seam/hibernate search
epbernard Aug 16, 2007 10:08 PM (in response to frippe)"norman.richards@jboss.com" wrote:
I agree with Christian 100% on this. I don't want anything more complex than google. I can handle quotes, but anything more than that should be strictly for the power users. I particularly dislike the need to use "*" for partial matches.
one-box dump user search mask are not that simple to build. The way to achieve it is to have a simpler grammar for the query (like the one you describe), and do a multi layer search (eg. first all exact terms with AND, then exact term with OR then approximate term etc)
The problem is that such multi layer search engines are very very business and data specific and there is no real way to have a decent off the shelves solution. It needs customization. -
13. Re: Seam/hibernate search
christian.bauer Aug 16, 2007 10:19 PM (in response to frippe)But Lucene has its own QueryParser already, why would we write another syntax and another parser? Yes, it is not very stable and throws exceptions all the time (fun on JIRA which uses it). I see more chance improving the Lucene criteria API though by abstracting it a little. For example:
@org.hibernate.search.annotations.Indexed @Entity @Searchable(description = "Documents") public class Document { @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.TOKENIZED) @Searchable(description = "Content") private String content; @org.hibernate.search.annotations.Field( index = org.hibernate.search.annotations.Index.UN_TOKENIZED, store = org.hibernate.search.annotations.Store.YES ) @org.hibernate.search.annotations.DateBridge(resolution = org.hibernate.search.annotations.Resolution.DAY) @Searchable(description = "Modified", type = SearchableType.PASTDATE) protected Date lastModifiedOn; }
The @Searchable annotation is mine. With this I can:
- build an internal metamodel of searchable entities and properties
- build a UI from this metamodel (I have the description text)
- generate a compound Lucene query with AND/OR semantics (depending on users choice) from the UI input, using some generic value holders to transport the search strings
I think this can be made generic enough to justify inclusion in Hibernate Search and Seam (for the UI part). -
14. Re: Seam/hibernate search
epbernard Aug 16, 2007 10:47 PM (in response to frippe)You need a parser one way or another to split words of your query
'java Hibernate'
Should end up being 'Java' and 'Hibernate'
Then from those you can do (by priority layer)
Java AND Hibernate
Java OR Hibernate
Java~ OR Hibernate
Java OR Hibernate~
etc
If you reuse the Lucene query parser, you end up losing the ability to define those layers
PS I haven't looked yet at the @Searchable framwork you did for the Wiki