Elasticsearch는 geo shape 타입을 확장할 수 있다.  spatical4j와 jts를 포함한 geo shape filter를 할 수 있다. 


<dependency>

    <groupId>com.spatial4j</groupId>

    <artifactId>spatial4j</artifactId>

    <version>0.4.1</version>                        

</dependency>


<dependency>

    <groupId>com.vividsolutions</groupId>

    <artifactId>jts</artifactId>

    <version>1.13</version>                         

    <exclusions>

        <exclusion>

            <groupId>xerces</groupId>

            <artifactId>xercesImpl</artifactId>

        </exclusion>

    </exclusions>

</dependency>



아래 링크보면 진짜 다양한 형태를 지원한다. 

https://github.com/spatial4j/spatial4j

http://www.vividsolutions.com/jts/jtshome.htm




https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/query-dsl-filters.html#geo-shape-filter

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-filter.html






Posted by '김용환'
,