[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-697) Think about improving type mismatch detection between QueryBuilder output and targeted FullTextQuery
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Fri Feb 25 07:20:08 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=40076#action_40076 ]
Emmanuel Bernard commented on HSEARCH-697:
------------------------------------------
1.
They don't have to match, the final Lucene query can be built from several query builders actually.
What has to match is the field name and the entity for a given builder.
2.
We should definitely work on better error messages
I could not find anything that satisfied me back in the days to avoid the queryBuilder / creatFullTextQuery duplication, but we can try to think about it again.
> Think about improving type mismatch detection between QueryBuilder output and targeted FullTextQuery
> ----------------------------------------------------------------------------------------------------
>
> Key: HSEARCH-697
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-697
> Project: Hibernate Search
> Issue Type: Bug
> Components: query
> Reporter: Sanne Grinovero
> Assignee: Emmanuel Bernard
> Fix For: 3.4.0.Beta1
>
>
> Use cases:
> 1)we ask for the target type when creating a QueryBuilder, then we ask again for the same information again at FullTextQuery creation - they must match.
> 2)it seems that when people get the match wrong, they receive cryptic error messages (see https://forum.hibernate.org/viewtopic.php?f=9&t=1009700 )
> It would be nice if we could infer the target type from the builder, we'd likely have to introduce a new class hiding away org.apache.search.Query in something which knows a bit more about types. Or maybe introduce a new method in FullTextSession to create a Hibernate.Query directly from the builder, projecting on the known types.
> train of thoughts.. maybe this could lead to a typesafe API to define fulltext projections reusing JPA2 metamodel in case it's available.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list