Archive for March 3rd, 2008

Exclude Alias From All Poll

Monday, March 3rd, 2008

Myself and Maurice (the mind behind the Grails searchable plugin) are having an interesting discussion if Compass should, by default, include the alias in the all property.

Currently Compass includes the alias in the all property. And in version 2.0, one can configure if it should be excluded globally or on a per class mapping.

So, I am asking you Compass users, what do you think? Should it be included by default or not?

[Update:] Here is a short example of what I describe here:

Lets assume you have the following POJO:

1
2
3
4
5
6
@Searchable(alias = "customer")
public class Customer {
 
   // ... customer properties
 
}

When alias is not excluded from the all property, then a search for customer will return all the customers. If it is excluded, then a search for customer will not return anything (assuming that you don’t have the token customer on any other property).