Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7097811C67 for ; Sun, 24 Aug 2014 13:20:36 +0000 (UTC) Received: (qmail 63918 invoked by uid 500); 24 Aug 2014 13:20:30 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 63849 invoked by uid 500); 24 Aug 2014 13:20:30 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 63837 invoked by uid 99); 24 Aug 2014 13:20:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Aug 2014 13:20:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of david.w.smiley@gmail.com designates 209.85.160.179 as permitted sender) Received: from [209.85.160.179] (HELO mail-yk0-f179.google.com) (209.85.160.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Aug 2014 13:20:26 +0000 Received: by mail-yk0-f179.google.com with SMTP id 142so9756512ykq.38 for ; Sun, 24 Aug 2014 06:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=54g7LIWJUBbEj0C9sCpXhBdLU/0y9OwhSf//SxmY6ic=; b=k9557cEgkeky4QWw7BtDPk+egpWlgj8UYry09aM57kHN4TglFXM0Gc7pBeHQc1SsPg mKiSXYTYHTouULfR5qKt/tCMzxYLPevsWsGRQ2aGxE3Q0Jw9+fuDsV5BMTimv6xkT3aa TWAOKB2zlnZ8ro6GRB9FbgfCTzrdIaymMpbvBSVbbLNHsDolPOr+qIYtvHsx8BLpbXzM g5aZkWyROK85koE9Tw7/jPG8xb4qR8dqXqTr7985JFqYwq16qUy9rGyKP2O6qcohC4Us tFxvRM2E17GcFQqO8JFtghwRNZiiyxVW7CRoFAhHxaU0MAx4Qigkn/UQ/Q/gkT2n4CP8 PjvA== MIME-Version: 1.0 X-Received: by 10.236.148.112 with SMTP id u76mr25814603yhj.22.1408886405279; Sun, 24 Aug 2014 06:20:05 -0700 (PDT) Received: by 10.170.36.23 with HTTP; Sun, 24 Aug 2014 06:20:05 -0700 (PDT) In-Reply-To: References: <07DF13AABD377140ADD3FE3E3B097F857F169DBF@se-ex024.groupinfra.com> Date: Sun, 24 Aug 2014 09:20:05 -0400 Message-ID: Subject: Re: Indexing and Querying MS SQL Server 2012 Spatial From: "david.w.smiley@gmail.com" To: solr-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Aug 24, 2014 at 2:29 AM, Bostic, Alex wrote: > Ok updating my field type to the below, allowed me to index :-) HUGE THAN= KS > > geo=3D"false" distErrPct=3D"0.025" maxDistErr=3D"0.000009" units= =3D"degrees" worldBounds=3D"ENVELOPE(-150281000,150281000,74670000,-5792200= 0)" /> > > Two more questions: > Should I update maxDistErr? Definitely, yes. The value you have there is based on a meter when geo=3Dtrue. Apparently you are using a projection (geo=3D=E2=80=9Cfalse= =E2=80=9D), and you should pick a value corresponding to the maximum precision you want in your projected space. It appears that 7.5 is a meter, assuming the min & max X you have above represent the entire world (on earth). Maybe you can afford to be less precise, and save time on indexing. FYI you should check out my blog post related: http://www.opensourceconnections.com/blog/2014/04/11/indexing-polygons-in-l= ucene-with-accuracy/ > > Is it possible to use the SQL Server Geometry type and convert it to WKT = in the data-config file as shown below, or is there still an issue that I a= m not seeing > > query=3D"SELECT wt.Id, wt.Name, wt.WorkTypeTypeId,wt.ChildId,wt.CreatedDa= te,wt.ModifiedDate,wt.Year, wta.GEOM.STAsText(), wta.OBJECTID,wta.WTArea > FROM dbo.WorkTypes wt Inner Join dbo.WorkTypeAreas wta ON wt.Id =3D wta= .WorkTypeId"> > > wta.GEOM.STAsText() <- does not show in the index, is of type SQL Server = Geometry > > wta.WTArea <- does show in the index, is of type varchar(max) > > they are defined similarly in schema.xml > > > I don=E2=80=99t know=E2=80=A6 this is related to SQL Server and not Lucene/= Solr. ~ David p.s. I=E2=80=99m going to FOSS4G next month. There are at least 2 talks ab= out Lucene spatial.