I have a couple of questions about using Components in Search.
I have a Business object that is defined below.
@Indexed(index = "businesses")
public class Business {
...
@DocumentId
private Integer businessId;
@Field(index = Index.TOKENIZED)
private String name;
private LatLng latLng = new LatLng();
...
@Field(index = Index.UN_TOKENIZED, store=Store.YES)
private Double averageRating = 0.0;
@Field(index = Index.UN_TOKENIZED, store=Store.YES)
private Double averageFrequency = 0.0;
}
LatLng is a reusable Component across applications (some not using Hibernate Search)
public class LatLng {
...
private Double lat;
private Double lng;
...
}
LatLng is a reusable component that I want to restrict my searches against, i.e. within a certain geographical location as well as a full text search on numerous other Business properties.
First of all...can this be done? If so...how?
Do I need to declare LatLng as Indexable?
Can I restrict my FullTextSearch query with a Hibernate Criteria against lat/lng?
Do I need to "store=Store.YES" for averageRating/Frequency if I want to sort by these?
If not, what is the best approach to be able to achieve this behavior?
Thanks in advance.
- Doug
|