Re: How to use geospatial search to find the locations within polygon

2016-03-05 Thread david.w.smi...@gmail.com
A Java NoClassDefFoundError of something in com.vividsolutions.jts means you don't have JTS on your classpath. You should put the JTS jar file in server/lib/. You can download it from maven-central. Here's a search for JTS with the 1.14 version: http://search.maven.org/#artifactdetails%7Ccom.viv

Re: How to use geospatial search to find the locations within polygon

2016-03-05 Thread david.w.smi...@gmail.com
> -- Jack Krupansky > > On Fri, Mar 4, 2016 at 10:20 AM, david.w.smi...@gmail.com < > david.w.smi...@gmail.com> wrote: > > > First of all, assuming this is a standard point-in-polygon situation, use > > the Intersects predicate -- with point data it's semantically t

Re: Spatial Search on Postal Code

2016-03-05 Thread david.w.smi...@gmail.com
Another path to consider is doing this point-in-zipcode-poly lookup at index time and enriching the document with a zipcode field (possibly multi-valued if there is doubt). On Sat, Mar 5, 2016 at 4:05 AM steve shepard wrote: > re: Postal Codes and polygons. I've heard of basic techniques that us

Re: How to use geospatial search to find the locations within polygon

2016-03-04 Thread david.w.smi...@gmail.com
First of all, assuming this is a standard point-in-polygon situation, use the Intersects predicate -- with point data it's semantically the same as IsWithin and Intersects is much faster. I don't know why you used isDisjointTo in your 2nd example; maybe you want to find when they don't touch? Any

Re: Using Solr's spatial functionality for astronomical catalog

2016-02-16 Thread david.w.smi...@gmail.com
t; > "--- row #1-----", > > "", > > "'0.5681586795334928,-0.673125699210'", > > "MatchDec", > > -0.67312569921, > > "SourceDec", > > -0.

Re: SOLR ranking

2016-02-16 Thread david.w.smi...@gmail.com
I just want to interject to say one thing: You *can* sort on multi-valued fields as-of recent Solr 5 releases. it's done using the "field" function query with either a "min" or "max" 2nd argument: https://cwiki.apache.org/confluence/display/solr/Function+Queries Of course it'd be nicer to simply s

Re: Using Solr's spatial functionality for astronomical catalog

2016-01-20 Thread david.w.smi...@gmail.com
Hello Colin, If the spatial field you use is the SpatialRecursivePrefixTreeFieldType one (RPT for short) with geo="true" then the circle shape (i.e. point-radius filter) implied by the geofilt Solr QParser is on a sphere. That is, it uses the "great circle" distance computed using the Haversine f

Re: Solr Spatial search with self-intersecting polygons

2015-12-10 Thread david.w.smi...@gmail.com
Hello, To have Solr be tolerant to invalid polygons, use the “validationRule” attribute on the field type definition. This setting and some others are documented here: https://locationtech.github.io/spatial4j/apidocs/com/spatial4j/core/context/jts/JtsSpatialContextFactory.html Try using repairBuf

Re: Geospatial Predicate Question

2015-08-19 Thread david.w.smi...@gmail.com
Hi Jamie, Your understanding is inverted. The predicates can be read as: . For indexed point data, there is almost no semantic different between the Within and Intersects predicates. There is if the field is multi-valued and you want to ensure that all of the points for a document are with

Suggester with file source with SolrCloud

2015-07-03 Thread david.w.smi...@gmail.com
The Suggester “FileDictionaryFactory” resolves the sourceLocation parameter against the SolrResourceLoader, and in SolrCloud that’s ZkSolrResourceLoader. The base SolrResourceLoader supports a solr.allow.unsafe.resourceloading=true system property to be set which basically allows you to refer to a

Re: [ANNOUNCE] Book: Apache Solr Enterprise Search Server, Third Edition

2015-06-25 Thread david.w.smi...@gmail.com
at 9:19 AM david.w.smi...@gmail.com < david.w.smi...@gmail.com> wrote: > Solr community, > > David Smiley, Eric Pugh, Kranti Parisa, and Matt Mitchell are happy to > *finally* announce the book “Apache Sor Enterprise Search Server, Third > Edition” by Packt Publishing. You can

[ANNOUNCE] Book: Apache Solr Enterprise Search Server, Third Edition

2015-06-22 Thread david.w.smi...@gmail.com
Solr community, David Smiley, Eric Pugh, Kranti Parisa, and Matt Mitchell are happy to *finally* announce the book “Apache Sor Enterprise Search Server, Third Edition” by Packt Publishing. You can find links to buy it Packt’s site & Amazon from our book’s official website: http://www.solrenterp

Re: Search for numbers

2015-05-21 Thread david.w.smi...@gmail.com
Hi Holger, It’s not apparent to me why you are using the spatial field to index a number. Why not simply a “tfloat” or whatever numeric field? Then you could use {!frange} with a function to get the difference and filter it to be in the range you want. RE query parsing (problem #1): you should

Re: Price Range Faceting Based on Date Constraints

2015-05-21 Thread david.w.smi...@gmail.com
Indeed: https://github.com/dsmiley/SOLR-2155 On Thu, May 21, 2015 at 8:59 PM alexw wrote: > Thanks David. Unfortunately we are on Solr 3.5, so I am not sure whether > RPT > is available. If not, is there a way to patch 3.5 to make it work? > > > > -- > View this message in context: > http://luce

Re: DocValues="true" and indexed="false"

2015-04-12 Thread david.w.smi...@gmail.com
Yes, surprisingly enough, if indexed=false, docValues=true — you can still search. I’ve seen the code behind it; it’s interesting. Rob wrote it. I’m not sure how scalable it is compared to the inverted index. I suspect it wouldn’t do well for a lot of distinct values but will fine for a small nu

Re: Example of sorting by custom function

2015-04-03 Thread david.w.smi...@gmail.com
ValueSourceParser — yes. You’ll find a ton of them in Solr to get ideas from. In your example you forgot the “asc” or “desc”. ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley On Fri, Apr 3, 2015 at 9:44 AM, Robert Krüger wrote: >

Re: Spatial Search killing Solr process

2015-03-19 Thread david.w.smi...@gmail.com
Hi Henrique, Please see the Solr reference guide instead of the “community wiki” you referenced: https://cwiki.apache.org/confluence/display/solr/Spatial+Search (you can download one for 4.10; the online link is always for the latest). For spatial filtering, *especially* at-scale, you really sho

Re: Solr returns incorrect results after sorting

2015-03-16 Thread david.w.smi...@gmail.com
I noticed you have an ‘&’ immediately preceding the "geodist() asc" at the very end of the query/URL; that’s supposed to be a comma since group.sort is a comma delimited list of sorts. ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley

Re: Solr query to match document "templates" - sort of a reverse wildcard match

2015-03-09 Thread david.w.smi...@gmail.com
A Lucene MultiPhraseQuery would work, with each phrase position having two Terms -- the as-seen word in the query and the term ‘?’. Performance wouldn’t be so great given that ‘?’ would appear extremely frequently. A variation solving the performance is to use CommonGrams but it would add some co

Re: Facet By Distance

2015-02-25 Thread david.w.smi...@gmail.com
st()&d=0.2 > --> returns 0 docs > > q=*:*&fq={!geofilt}&sfield=start_station&pt=40.71754834,-74.01322069&d=0.2 > --> returns 1484 docs > > Not sure why the first query with returns 0 documents > > On Wed, Feb 25, 2015 at 8:46 PM, david.w.smi...

Re: Facet By Distance

2015-02-25 Thread david.w.smi...@gmail.com
Hi, This will “return all the documents in the index” because you did nothing to filter them out. Your query is *:* (everything) and there are no filter queries. ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley On Wed, Feb 25, 2015 a

Re: performance issues with geofilt

2015-02-25 Thread david.w.smi...@gmail.com
ll when I modify > the parameters to: > q=*:*&fq=typ:strasse&fq={!geofilt}&sfield=geometry&pt=51.370570625523,12.369290471603&d=1.0&sort=geofilt() > asc > > Kind regards, > > Dirk > > > Tue, 24 Feb 2015 19:42:03 GMT, david.w.smi...@gmail.com> wr

Re: performance issues with geofilt

2015-02-24 Thread david.w.smi...@gmail.com
Hi Dirk, The RPT field type can be used for distance sorting/boosting but it’s a memory pig when used as-such so don’t do it unless you have to. You only have to if you have a multi-valued point field. If you have single-valued, use LatLonType specifically for distance sorting. Your sample quer

Re: trouble running indexer with Solr spatial

2015-01-27 Thread david.w.smi...@gmail.com
Hi vit, FYI that’s the old wiki and it contains a notice in red at the top that you should refer to its replacement at: https://cwiki.apache.org/confluence/display/solr/Spatial+Search That said, there are some small details that haven’t been migrated but there is outdated info too so beware. The

Re: Solr Error when making GeoPrefixTree polygon filter search

2014-12-11 Thread david.w.smi...@gmail.com
As in the layout shipped with Solr? Try putting the JTS ‘jar’ in lib/ext and let us know if that worked. I think it will but I forget. ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley On Thu, Dec 11, 2014 at 12:40 PM, mathaix wrote

Re: Solr Error when making GeoPrefixTree polygon filter search

2014-12-10 Thread david.w.smi...@gmail.com
Mathaix, I bet you don’t have JTS on your classpath. See the spatial page in the Solr ref guide. ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley On Wed, Dec 10, 2014 at 4:50 PM, mathaix wrote: > So I downloaded and attached the sp

Re: Indexing problems with BBoxField

2014-11-24 Thread david.w.smi...@gmail.com
Thomas, Thank you for communicating on the list about your experience and raising the JIRA issue. I meant to respond last night but lost the chance. (and Jack, thanks for helping Thomas out). I’ll follow-up to SOLR-6784. SOLR-6781 now has a bug-fix patch. I’ll apply it later today. ~ David Smi

Re: solr highlighting query

2014-10-27 Thread david.w.smi...@gmail.com
t; > Regards, > John Eipe > > “The Roots of Violence: Wealth without work, Pleasure without conscience, > Knowledge without character, Commerce without morality, Science without > humanity, Worship without sacrifice, Politics without principles” > - Mahatma Gandhi > > On 27

Re: solr highlighting query

2014-10-27 Thread david.w.smi...@gmail.com
John, I’m not seeing this problem. Presumably we’re talking about the default highlighter (the most accurate one) but I figure the others would match it too. To test, I added the following to HighlightTest.java in Solr and this test passed: @Test public void testSpan() { final String fie

Re: point buffer returned as an elipse, how to configure?

2014-09-25 Thread david.w.smi...@gmail.com
Hi Mark, I asked a follow-up question/observation to your Stackoverflow instantiation of your question. I also wrote the following, which doesn’t yet fit into an answer because I don’t know what problem you are yet experiencing: Some technical details: geo=true|false is an attribute on the field

Re: Indexing and Querying MS SQL Server 2012 Spatial

2014-08-24 Thread david.w.smi...@gmail.com
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 THANKS > > class="solr.SpatialRecursivePrefixTreeFieldType" > spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory" > geo="false" distErrP

Re: Indexing and Querying MS SQL Server 2012 Spatial

2014-08-23 Thread david.w.smi...@gmail.com
ying MS SQL Server 2012 Spatial > > Thanks I will try for a correct install. I have many other fields that are > indexing fine, I will inspect for further errors and use DIH debug mode. I > will also create a string field for geometries. > > One item to note is that the spatial

Re: Indexing and Querying MS SQL Server 2012 Spatial

2014-08-23 Thread david.w.smi...@gmail.com
ermantown, MD 20876 > direct line: 301-820-3287 > cell line: 301-213-2639 > > > -Original Message- > From: david.w.smi...@gmail.com [mailto:david.w.smi...@gmail.com] > Sent: Saturday, August 23, 2014 9:15 AM > To: solr-user@lucene.apache.org > Subject: Re: Indexing a

Re: Indexing and Querying MS SQL Server 2012 Spatial

2014-08-23 Thread david.w.smi...@gmail.com
expand in the > red button) that are result of a bounding box query to geometry index in solr. > Something like this : (...)q=bounds:Intersects(-9.463118366688718 > 38.67913579372146 -9.370549969166746 38.7109390712568)(...) > > After this, we actually provided for a differ

Re: Announcing "Splainer" -- Open Source Solr Sandbox

2014-08-22 Thread david.w.smi...@gmail.com
Cool Doug! I look forward to digging into this. ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley On Fri, Aug 22, 2014 at 10:34 AM, Doug Turnbull < dturnb...@opensourceconnections.com> wrote: > Greetings from the OpenSource Connecti

Re: Indexing and Querying MS SQL Server 2012 Spatial

2014-08-20 Thread david.w.smi...@gmail.com
Hi Alex, I guess a spatial tutorial might be helpful, but there isn’t one. There is a sample at the Lucene-spatial layer but not up at Solr. You need to use WKT syntax for line’s and polys, and you may do so as well for other shapes. And in the schema use location_rpt copied from Solr’s example

Re: Index a time/date range

2014-07-30 Thread david.w.smi...@gmail.com
The wiki page on the technique cleans up some small errors from Hoss’s presentation: http://wiki.apache.org/solr/SpatialForTimeDurations But please try Solr trunk which has first-class support for date durations: https://issues.apache.org/jira/browse/SOLR-6103 Soonish I’ll back-port to 4x. ~ Davi

Re: spatial search: find result in bbox OR first result outside bbox

2014-07-24 Thread david.w.smi...@gmail.com
Hi Elisabeth, Sorry for not responding sooner; I forgot. You’re in need of some spatial nearest-neighbor code I wrote but it isn’t open-sourced yet. It works on the RPT grid. Any way, you should consider doing this in two searches: the first query tries the bbox provided, and if that returns no

Re: Performance/scaling with custom function queries

2014-06-11 Thread david.w.smi...@gmail.com
On Wed, Jun 11, 2014 at 7:46 AM, Robert Krüger wrote: > Or will I have to set up distributed search to achieve that? Yes — you have to shard it to achieve that. The shards could be on the same node. There were some discussions this year in JIRA about being able to do thread-per-segment but it

Re: Extract values from custom function for ValueSource with multiple indexable fields

2014-06-08 Thread david.w.smi...@gmail.com
I suggest investigating this using a known example that does this, such as LatLonType and geodist(). LatLonType registers the field in a custom way too. ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley On Sun, Jun 8, 2014 at 7:54 AM

Re: SOLR-6143 Bad facet counts from CollapsingQParserPlugin

2014-06-06 Thread david.w.smi...@gmail.com
I may be misunderstanding the problem, but if it’s what I think it is, then users can work-around this now quite easily by using Solr faceting’s ability to exclude a named/tagged filter query: &q=classIDs:12 &fl=PrSKU &fq={!collapse tag=collapse field=PrSKU} &facet=true &facet.field={! ex=collapse

Re: sort by spatial distance in faceting

2014-06-04 Thread david.w.smi...@gmail.com
arn deeply about solr spatial, i am new in solr and i > really want to contribute here :) > > Any help will be really appreciated. > > @David Sorry for the late reply. > > With Regards > Aman Tandon > > > On Tue, May 27, 2014 at 9:36 AM, david.w.smi...@gmail.com < &g

Re: DirectSpellChecker not returning expected suggestions.

2014-06-02 Thread david.w.smi...@gmail.com
e not > > tried using anything else. > > > > Is the distance calculation of Solr different than what Levestien > distance > > calculation ? I have set maxEdits to 1 , assuming that this corresponds > to > > the maxDistance. > > > > Thanks for your help! >

Re: DirectSpellChecker not returning expected suggestions.

2014-06-02 Thread david.w.smi...@gmail.com
What do you get then? Suggestions, but not the one you’re looking for, or is it deemed correctly spelled? Have you tried another spellChecker impl, for troubleshooting purposes? ~ David Smiley Freelance Apache Lucene/Solr Search Consultant/Developer http://www.linkedin.com/in/davidwsmiley On S

Re: Solr GeoHash Field (Solr 4.5)

2014-05-29 Thread david.w.smi...@gmail.com
On IRC you said you found out the answers before I came along. For everyone else’s benefit: * Solr’s “documentation” is essentially the “Solr Reference Guide”. Only look at the wiki as a secondary source. * See “location_rpt” in the example schema.xml which supports multi-valued spatial data. I

Re: 答复: (Issue) How improve solr facet performance

2014-05-27 Thread david.w.smi...@gmail.com
Alice, RE grouping, try Solr 4.8’s new “collapse” qparser w/ “expand" SearchComponent. The ref guide has the docs. It’s usually a faster equivalent approach to group=true Do you care to comment further on NewEgg’s apparent switch from Endeca to Solr? (confirm true/false and rationale) ~ David

Re: sort by spatial distance in faceting

2014-05-26 Thread david.w.smi...@gmail.com
Hi Aman, That’s an interesting feature request that I haven’t heard before. First reaction: Helliosearch (a fork of Solr that is kept up to date with changes from Solr) is extremely close to supporting such a thing because it supports sorting facets by Helliosearch specific aggregation functions

Re: range types in SOLR

2014-05-06 Thread david.w.smi...@gmail.com
Hi Era, I appreciate the scattered documentation is confusing for users. The use of spatial for time durations is definitely not an official way to do it; it’s clearly a hack/trick — one that works pretty well if you know the issues to watch out for. So I don’t see it getting documented on the r

Re: create heat maps

2014-04-09 Thread david.w.smi...@gmail.com
No movement here lately but this is something to read if you're venturing down this path: http://wiki.apache.org/solr/SpatialClustering On Wed, Apr 9, 2014 at 1:19 AM, Aman Tandon wrote: > How can we create the heat maps using solr spatial search? > > Thanks > Aman Tandon >

Re: what is geodist default value

2014-04-08 Thread david.w.smi...@gmail.com
standable to me that why it is returning the > variable distance for every results? > > > On Tue, Apr 8, 2014 at 6:51 PM, david.w.smi...@gmail.com < > david.w.smi...@gmail.com> wrote: > >> You're computing the distance from the locations you've put in your index &g

Re: what is geodist default value

2014-04-08 Thread david.w.smi...@gmail.com
"title":"PVC Transparent Bags", >> "city":"Ghaziabad", >> "state":"Uttar Pradesh", >> "distance":8783.780020683036}, >> { >> "title":"Sand

Re: what is geodist default value

2014-04-07 Thread david.w.smi...@gmail.com
Hi, I'm not sure why you are asking or maybe I'm not getting what you *really* want to know. You'll get the geodesic distance (i.e. the "great circle distance", the distance on the surface of a sphere) from 0,0 (off the coast of Africa), to each point indexed in your "location" field. ~ David

Re: Routing distance with Solr?

2014-04-07 Thread david.w.smi...@gmail.com
Hi, This is definitely not possible with Solr. Use GraphHopper. ~ David On Mon, Apr 7, 2014 at 5:09 AM, Matteo Tarantino wrote: > Hi all, > this is my first message on this mailing list, so I hope I'm doing all > correctly. > > My problem is: I have to create a search engine of dealers that ar