Hi,
I am trying to integrate Hibernate Search and lucene spatial using the DSL query api though I am not sure if this is even possible. I am using:
Hibernate Core 3.6.0
Hibernate Search 3.3.0
Lucene Core 3.0.2
Lucene Spatial 3.0.2
I created the annotation for the geohash property as such:
Code:
@Transient
@Field(index = Index.UN_TOKENIZED, store = Store.YES, name = "geohash")
public String getGeohash() {
return GeoHashUtils.encode(latitude, longitude);
}
Now, I wanted to create a query object but I was not sure the best way to go about doing it. This was my last attempt:
Code:
FullTextSession fullTextSession = Search.getFullTextSession(session);
DistanceQueryBuilder distanceQueryBuilder = new DistanceQueryBuilder(lat,longitude, distance,"geohash",CartesianTierPlotter.DEFALT_FIELD_PREFIX, true);
Query query = fullTextSession.createFullTextQuery(new ConstantScoreQuery(distanceQueryBuilder.getFilter()));
This returns no results. Is what I am trying to do possible, or do I need to do the search through the lucene api?
Michael