Issue Type: Improvement Improvement
Affects Versions: 4.3.0.CR1
Assignee: Unassigned
Components: query
Created: 31/May/13 7:59 AM

Currently the type passed to forEntity() is not used to limit the query results to that type. This can be surprising when doing queries like this:

Query query = queryBuilder
    .forEntity( Animal.class )

This query will return all instances of all indexed entities instead of only Animal instances as one might expect. Instead the type has to be restricted when creating the FullTextQuery:

 fullTextSession.createFullTextQuery( query, Animal.class );

The given entity type should be considered for type restriction implicitely, or there should be an option for this.

In a first step the documentation of forEntity() should describe the behavior.

Project: Hibernate Search
Priority: Major Major
Reporter: Gunnar Morling
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: