2014-12-04 46 views
1

我們正在從Nest 1.0.0遷移到1.2.1,並且我很難弄清楚如何使用不同的地理運營商。巢1.2.1地理FilterDescriptor - 如何選擇運營商?

以前,我有這行代碼:

f.GeoShape(fieldName, geo => geo.Coordinates(points).Type("polygon").Relation("intersects")); 

其中F是一個空FilterDescriptor,並指出是

IEnumerable<IEnumerable<IEnumerable<double>>> 

但在鳥巢1.2.1沒有GeoShape。我發現的最接近的東西是GeoShapePolygon,但它不接受一個操作符作爲參數,而且我需要使用不同的操作符(以前使用過的「within」,「intersects」和「disjoint」)。

如何在Nest 1.2.1中實現此功能?

+0

嘿米哈爾,感謝您指出了這一點。看起來NEST缺少'Relation'選項。我剛剛打開[#1090](https://github.com/elasticsearch/elasticsearch-net/issues/1090)爲此添加支持。 – 2014-12-04 15:53:06

回答