Return-Path: X-Original-To: apmail-jena-commits-archive@www.apache.org Delivered-To: apmail-jena-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21824102A6 for ; Mon, 16 Sep 2013 08:11:38 +0000 (UTC) Received: (qmail 42438 invoked by uid 500); 16 Sep 2013 08:11:36 -0000 Delivered-To: apmail-jena-commits-archive@jena.apache.org Received: (qmail 42422 invoked by uid 500); 16 Sep 2013 08:11:35 -0000 Mailing-List: contact commits-help@jena.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jena.apache.org Delivered-To: mailing list commits@jena.apache.org Received: (qmail 42415 invoked by uid 99); 16 Sep 2013 08:11:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Sep 2013 08:11:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Sep 2013 08:11:31 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 876DE2388ABC for ; Mon, 16 Sep 2013 08:11:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r878588 - in /websites/staging/jena/trunk/content: ./ documentation/query/spatial-query.html Date: Mon, 16 Sep 2013 08:11:09 -0000 To: commits@jena.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130916081109.876DE2388ABC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Mon Sep 16 08:11:09 2013 New Revision: 878588 Log: Staging update by buildbot for jena Modified: websites/staging/jena/trunk/content/ (props changed) websites/staging/jena/trunk/content/documentation/query/spatial-query.html Propchange: websites/staging/jena/trunk/content/ ------------------------------------------------------------------------------ --- cms:source-revision (original) +++ cms:source-revision Mon Sep 16 08:11:09 2013 @@ -1 +1 @@ -1523333 +1523557 Modified: websites/staging/jena/trunk/content/documentation/query/spatial-query.html ============================================================================== --- websites/staging/jena/trunk/content/documentation/query/spatial-query.html (original) +++ websites/staging/jena/trunk/content/documentation/query/spatial-query.html Mon Sep 16 08:11:09 2013 @@ -161,6 +161,7 @@ for a large scale enterprise search appl
  • Property Function Library
  • Spatial Dataset Assembler
  • +
  • Working with Solr
  • Working with Fuseki
  • Building a Spatial Index
  • @@ -367,6 +368,32 @@ You also optionally use JtsSpatialContex

    Key here is that the assembler contains two dataset definitions, one for the spatial dataset, one for the base data. Therefore, the application needs to identify the text dataset by it's URI 'http://localhost/jena_example/#spatial_dataset'.

    +

    Working with Solr

    +

    Besides Lucene, jena-spatial can work with Solr for spatial query, powered by Lucene / Solr 4 Spatial and Solrj.

    +

    It's required to add the field definitions for "entityField" and "geoField" respectively in schema.xml of Solr. +The names of the fields in EntityDefinition should be in accordance with those in schema.xml. +Here is an example defining the names of "entityField" as "uri" and "geoField" as "geo":

    +
    <field name="uri" type="string" indexed="true" stored="true" required="true" multiValued="false" /> 
    +<field name="geo"  type="location_rpt"  indexed="true" stored="true"  multiValued="true" />
    +
    + + +

    The fieldType of "entityField" is string, while that of "geoField" is location_rpt:

    +
    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
    +<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
    +
    + + +

    Addtionally, in solrconfig.xml, there should be 2 requestHandlers defined for querying and updating the spatial data and the index.

    +
    <requestHandler name="/select" class="solr.SearchHandler"></requestHandler>
    +<requestHandler name="/update" class="solr.UpdateRequestHandler"></requestHandler>
    +
    + + +

    The above is the least required configuration to run jena-spatial in Solr. +For more information about the configuration, please check the Lucene / Solr 4 Spatial documentation.

    +

    There're also some demostrations of the usage of Solr in the unit tests of jena-spatial. +They use a EmbeddedSolrServerwith a SOLR_HOME sample here.

    Working with Fuseki

    The Fuseki configuration simply points to the spatial dataset as the fuseki:dataset of the service.

    <#service_spatial_tdb> rdf:type fuseki:Service ;