[hibernate-dev] Feature Proposal for Hibernate Search

Martin Braun martinbraun123 at aol.com
Mon Feb 3 15:57:28 EST 2014


HI Emmanuel,
Hi Martin,

> That's interesting. I have a couple of questions for you.
> What is the notion of profile and when would you use it?
This can be used when you'd like to be able to use the same queryBean in different contexts
sou you don't have to write a different Bean if you only need a query that's a little bit different.
> When do you need and use sub query ids?
This is needed if you want to do queries like this (explained in boolean-logic):
(queryA && (!queryB || queryC)).
You can get as complicated as you want with this. These SubQueries are mainly used because
Java doesn't allow recursiveness in Annotations.
> The issue you had was to map getters to query parameters in an easier way than 
> currently possible, correct? It reminds me a little bit of the Example query 
> with a parameter twist. 
Which one are you talking about?
> I have to admit, I am a bit skeptical on a few things:
> - having to extend a technical class
I am too, As stated in the e-mail before I want to get away from that design but I still
want to be able to write queries myself if I want to. This can be done with Annotations on
Method-Level or with QueryProviders in an extra Annotation on the Type-Level.
> - I don't think annotations are the best way to express queries but you probably 
> have your reasons, so let's discuss them :)
Why? I think it's not hard to read an you have the query right with your ParameterWrapper-class which holds your data.
> Have you explored the ability to write the query programmatically while still 
> making use of the getter binding? I can imagine we could update the DSL to 
> accept the parameters holder and have them injected.
I think that would be possible, but then you would still have to handle the
query nesting and such by hand and that code would be more complicated to use (but easier to debug, tbh).
> I wonder if literally an Example API would address your use cases ?
What do you mean by that?

Martin Braun
martinbraun123 at aol.com
www.github.com/s4ke




-----Original Message-----
From: Emmanuel Bernard <emmanuel at hibernate.org>
To: Martin Braun <martinbraun123 at aol.com>
Cc: hibernate-dev <hibernate-dev at lists.jboss.org>
Sent: Mon, Feb 3, 2014 9:45 pm
Subject: Re: [hibernate-dev] Feature Proposal for Hibernate Search


Hi Martin,

That's interesting. I have a couple of questions for you.

What is the notion of profile and when would you use it?

When do you need and use sub query ids?

The issue you had was to map getters to query parameters in an easier way than 
currently possible, correct? It reminds me a little bit of the Example query 
with a parameter twist. 

I have to admit, I am a bit skeptical on a few things:
- having to extend a technical class
- I don't think annotations are the best way to express queries but you probably 
have your reasons, so let's discuss them :)

Have you explored the ability to write the query programmatically while still 
making use of the getter binding? I can imagine we could update the DSL to 
accept the parameters holder and have them injected. 

I wonder if literally an Example API would address your use cases ?

Thanks the first thoughts

Emmanuel

> On 3 févr. 2014, at 19:08, Martin Braun <martinbraun123 at aol.com> wrote:
> 
> 
> Hi,
> 
> 
> I am currently working on a new way to query in Hibernate Search. It's not 
finished, but
> it already works. I am planning on extending the functionality a lot in the 
future and
> I thought this could be a nice addition to Hibernate Search. What do you 
think?
> 
> 
> https://github.com/s4ke/HibernateSearchQueryExtension
> 
> 
> Martin Braun
> martinbraun123 at aol.com
> www.github.com/s4ke
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

 


More information about the hibernate-dev mailing list