lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zonski <>
Subject Multipoint date ranges with spatial - Invalid Longitude Exception?
Date Mon, 12 Aug 2013 01:25:23 GMT

I'm trying to implement date range searching using spatial features as per:

I've followed the steps and read through the linked articles but I can't get
past an exception: 

        InvalidShapeException: Invalid longitude: longitudes are range -180
to 180: provided lon: [2013224.0]

I am trying to model date ranges so a thing (in my case a grant that you can
apply for) could be open open for a few months, then closes for a few
months, and then re-opens, etc. I want to find all grants that are open for
applicants in a specific date range (e.g. what can I apply for between
1-Mar-2013 and 1-Apr-2013). 

I have a field type like so: 

       <fieldType name="date_range"
                   worldBounds="0 0 3000000 3000000"

And a field like so: 

        <field name="grantRoundDates" type="date_range" indexed="true"
stored="true" required="false" multiValued="true"/>

Then I store values in this field, using a simple/rough calc of (year * 1000
+ dayOfYear). I know this is not a perfect mapping for duration but I think
it should be enough for my purposes and is easy to read/debug.  

So I end up with something like: 

        <field name="grantRoundDates">2013224 2013301</field> 

Then I query on this using something like: 

        grantRoundDates:"Intersects(0, 2013224, 2014231, 3000000)"

And I get the above exception about 2013224 not being a valid longitude. I'm
not sure why Solr is trying to convert this to Longitude when I have
geo=false but I admit my understanding of this whole space is pretty basic
at this stage. 

The examples in the links provided all use nice, small numbers. If I use
small numbers like this: 

        grantRoundDates:"Intersects(0, 100, 100, 3000000)"

Then it doesn't error but also returns no results (as expected). Am I
suppose to map my range to fit between -180 and 180, or there is something
more I have to do to get Solr to allow my larger numbers?


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message