lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Atkinson <>
Subject Re: SpatialRecursivePrefixTreeFieldType Spatial Searching
Date Mon, 03 Jun 2013 11:37:30 GMT
Also, here is a sample query, and the debugQuery output

fq={!cost=200}*:* -availability_spatial:"Intersects(182.6 0 199.4 1)"

Incase the formatting is bad, here is a raw past of the debugQuery:

<?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"
> <int name="status">0</int> <int name="QTime">8171</int> <lst
> <str name="debugQuery">true</str> <str name="indent">true</str>
<str name=
"q">*:*</str> <str name="_">1370259235923</str> <str name="wt">xml</str>
str name="fq">{!cost=200}*:* -availability_spatial:"Intersects(182.6 0
199.4 1)"</str> <str name="rows">0</str> </lst> </lst> <result
"response" numFound="16137" start="0"> </result> <lst name="debug"> <str
name="rawquerystring">*:*</str> <str name="querystring">*:*</str> <str
"parsedquery">MatchAllDocsQuery(*:*)</str> <str name="parsedquery_toString">
*:*</str> <lst name="explain"/> <str name="QParser">LuceneQParser</str>
name="filter_queries"> <str>{!cost=200}*:*
-availability_spatial:"Intersects(182.6 0 199.4 1)"</str> </arr> <arr name=
"parsed_filter_queries"> <str>+MatchAllDocsQuery(*:*)
)</str> </arr> <lst name="timing"> <double name="time">8171.0</double>
name="prepare"> <double name="time">1.0</double> <lst name="query"> <double
name="time">0.0</double> </lst> <lst name="facet"> <double name="time">0.0</
double> </lst> <lst name="mlt"> <double name="time">1.0</double>
</lst> <lst
name="highlight"> <double name="time">0.0</double> </lst> <lst name="stats">
<double name="time">0.0</double> </lst> <lst name="debug"> <double
"time">0.0</double> </lst> </lst> <lst name="process"> <double
8170.0</double> <lst name="query"> <double name="time">8170.0</double>
> <lst name="facet"> <double name="time">0.0</double> </lst> <lst
> <double name="time">0.0</double> </lst> <lst name="highlight">
name="time">0.0</double> </lst> <lst name="stats"> <double name="time">0.0</
double> </lst> <lst name="debug"> <double name="time">0.0</double>
</lst> </
lst> </lst> </lst> </response>

On Mon, Jun 3, 2013 at 12:27 PM, Chris Atkinson <> wrote:

> Hi,
> I'm seeing really slow query times. 7-25 seconds when I run a simple
> filter query that uses my SpatialRecursivePrefixTreeFieldType field.
> My index is about 30k documents. Prior to adding the Spatial field, the on
> disk space was about 100Mb, so it's a really tiny index. Once I add the
> spatial field (which is multi-values), the index size jumps up to 2GB. (Is
> this normal?).
> Only about 10k documents will have any spatial data. Typically, they will
> have at most 10 shapes each, but the majority are all one of two
> rectangles.
> This is my fieldType definition.
>    <fieldType name="date_availability"
> class="solr.SpatialRecursivePrefixTreeFieldType"
>                 geo="false"
>                 worldBounds="0 0 3650 1"
>                 distErrPct="0"
>                 maxDistErr="1"
>                 units="degrees"
>             />
> And the field
>  <field name="availability_spatial"  type="date_availability"
>  indexed="true" stored="false" multiValued="true" />
> I am using the field to represent approximately 10 years after January 1st
> 2013, where each day is along the X-axis. Because the availability starts
> and ends at 2pm and 10am, I was using a decimal place when creating my
> shape to show that detail. (Is this approach wrong?)
> So a typical rectangle when indexed would be (minX minY maxX maxY)
> Rectangle 100.6 0 120.4 1
> Is it wrong that my Y and X values are not of the same scale? Since I
> don't care about the Y axis at all, I just set it to be of 1 height always.
> I'm running Solr 4.3, with a small JVM of 768M (can be increased). And I
> have 2GB RAM. (Again can be increased).
> Thanks

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message