[ 
https://issues.apache.org/jira/browse/GEODE-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222923#comment-16222923
 ] 

ASF GitHub Bot commented on GEODE-3907:
---------------------------------------

PivotalSarge commented on a change in pull request #33: GEODE-3907: Adding an 
example of lucene spatial querying
URL: https://github.com/apache/geode-examples/pull/33#discussion_r147525353
 
 

 ##########
 File path: luceneSpatial/README.md
 ##########
 @@ -0,0 +1,59 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Geode Lucene Spatial Indexing Example
+
+This examples demonstrates how to use Geode's LuceneSerializer and 
LuceneQueryProvider APIs
+to customize how Geode data is stored and indexed in Lucene.
+
+In this example two servers host a partitioned region that stores train 
station stop information,
+including GPS coordinates. The region has lucene index that allows spatial 
queries to be performed
+against the data. The example shows how to do a spatial query to find nearby 
train stations.
+
+This example assumes that Java and Geode are installed.
+
+## Set up the Lucene index and region
+1. Set directory ```geode-examples/luceneSpatial``` to be the
+current working directory.
+Each step in this example specifies paths relative to that directory.
+
+2. Build the example
+
+        $ ../gradlew build
+
+3. Run a script that starts a locator and two servers, creates a Lucene index
+called ```simpleIndex``` with a custom LuceneSerializer that indexes spatial 
data. The script
+then creates the ```example-region``` region.
+
+        $ gfsh run --file=scripts/start.gfsh
+
+4. Run the example. This program adds data to the example-region, and then 
looks
+for train stations with a 1 mile of a specific GPS coordinate. Look at 
Example.java to see
+what this program does.
+
+
+        $ ../gradlew run
+
+
+5. Shut down the cluster
+
+        $ gfsh run --file=scripts/stop.gfsh
+
+6. Clean up any generated directories and files so this example can be rerun.
+    
+        $ ../gradlew cleanServer
 
 Review comment:
   Does `../gradlew cleanServer` need to be added to other examples, too?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Create an example of using the LuceneSerializer for spatial queries
> -------------------------------------------------------------------
>
>                 Key: GEODE-3907
>                 URL: https://issues.apache.org/jira/browse/GEODE-3907
>             Project: Geode
>          Issue Type: Sub-task
>          Components: docs, lucene
>            Reporter: Dan Smith
>            Assignee: Dan Smith
>
> It would be nice to have an example that shows how to use the new 
> LuceneSerializer API to customize how objects are written to the lucene 
> index. A good example would be using the serializer to enable spatial 
> indexing and querying using the lucene spatial APIs.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to