Hello!
Let's consider polygons. I imagine you are doing something like this to
index one polygon:
Polygon polygon = ....
Document document = new Document();
Field[] fields = LatLonShape.createIndexableFields(FIELDNAME, polygon);
for (Field f : fields) {
document.add(f);
}
So a multipolygon is just an array of polygons, so you can easily do:
Polygon[] multiPolygon = ....
Document document = new Document();
for (Polygon polygon: multiPolygon) {
Field[] fields = LatLonShape.createIndexableFields(FIELDNAME, polygon);
for (Field f : fields) {
document.add(f);
}
}
Hope it makes sense,
I.
On Fri, Oct 2, 2020 at 1:48 PM thturk <[email protected]> wrote:
> Hello Forum,
>
> I want to create a Reverse Geocode service for data i have in this data set
> there is Points, Lines, MultiLines, Polygons and MultiPolygons some how i
> was able to Index Point, Line And Poligon And created search queries for
> those indexes .But i can not understand how i will index Other Geometry
> Types is there any documents or code examples for Lucene Spatial Indexing
> I
> have seen Component2D but There is only InMemeory search as i understand.
>
> Lucene 8.6.0
> Jdk 12
>
>
>
> --
> Sent from:
> https://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>