On 29 January 2015 at 15:00, Gunnar Morling <gunnar(a)hibernate.org> wrote:
 How would the last one be done? You would define overridesForField
on
 QueryBuilder and prohibit its usage after anything else on the builder has
 been invoked?
 Or, you could have two different methods:
     QueryBuilder getQueryBuilder(Class<?> entityType);
     QueryBuilderContext buildQueryBuilder(Class<?> entityType);
 And then
     QueryBuilder qb = ftem. getQueryBuilder( Hike.class );
     QueryBuilder qb = ftem. buildQueryBuilder( Hike.class
 ).overridesForField( "organizer", "custom_analzer1" ).get();
 Naming-wise, I find buildQueryForEntity() not totally right, as the method
 doesn't build a query but a query builder. So I'd name it
 getQueryBuilder(). Or getDefaultQueryBuilder() + getQueryBuilder(). 
I was puzzled by the name as well. As I've written in the
same-timestamp reply of mine, I'm assuming Emmanuel is thinking of a
full method chaining.
Sanne