Thanks, Binh! I did try that and that works. I am still curious to find out
if there's any way to add the same during mapping time?
On Thursday, March 27, 2014 12:24:44 PM UTC-4, Kina Shah wrote:
>
> Hi,
>
> What's the best way to give a GeoPoint boost at the mapping time?
>
> I added a boost to List of GeoPoint field at the mapping time, but I don't
> see it doing anything with the score returned when I search on that
> geoPoint.
>
> Here's how I added it in.
> .startObject()
> .startObject(TYPE)
> .startObject("properties")
> .startObject("sen_location").field("type",
> "geo_shape").field("geohash", true).field("geohash_prefix",
> true).endObject()
> .startObject("fc_location").field("type",
> "geo_shape").field("geohash", true).field("geohash_prefix",
> true).endObject()
> .startObject("tgt_location").field("type",
> "geo_shape").field("geohash", true).field("geohash_prefix",
> true).endObject()
>
> .startObject("corner_location").field("type", "geo_shape").field("geohash",
> true).field("lat_lon", true).field("geohash_prefix", true).endObject()
>
> .startObject("senGeoPointLst").field("type", "geo_point").field("geohash",
> true).field("lat_lon", true).field("geohash_prefix", true).field("boost",
> 1).endObject()
>
> .startObject("fcGeoPointLst").field("type", "geo_point").field("geohash",
> true).field("lat_lon", true).field("geohash_prefix", true).field("boost",
> 3).endObject()
>
> .startObject("tgtGeoPointLst").field("type", "geo_point").field("geohash",
> true).field("lat_lon", true).field("geohash_prefix", true).field("boost",
> 2).endObject()
>
> .startObject("cornerGeoPointLst").field("type",
> "geo_point").field("geohash", true).field("lat_lon",
> true).field("geohash_prefix", true).field("boost", 4).endObject()
> .startObject("toaDTimeMin").field("type",
> "date").field("format", "date_time").endObject()
> .startObject("toaDTimeMax").field("type",
> "date").field("format", "date_time").endObject()
> .endObject()
> .endObject()
> .endObject();
>
> Is this correct? Why its not working?
>
> Thanks!
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/68a4e3a2-7c39-44ca-b09c-c439ec1bf579%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.