[ 
https://issues.apache.org/jira/browse/SOLR-6183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Smiley updated SOLR-6183:
-------------------------------

    Attachment: SOLR-6183__BBoxFieldType.patch

New patch:
* Syncs with the Lucene-spatial side in LUCENE-5714; in particular, docValues  
and wether to index or not are now supported.  Still limited to doubles though.
* New score=area & score=area2D options to return the area of the indexed 
shape. It's generally computed geodetically, but area2D uses simple & fast math 
(simply width * height) which is usually plenty good enough.
* score=overlapRatio is the new name for the former areaOverlap (or whatever I 
called it) algorithm.  And it has a new minSideLength local-param option.

> Add spatial BBoxField using BBoxSpatialStrategy
> -----------------------------------------------
>
>                 Key: SOLR-6183
>                 URL: https://issues.apache.org/jira/browse/SOLR-6183
>             Project: Solr
>          Issue Type: New Feature
>          Components: spatial
>            Reporter: David Smiley
>            Assignee: David Smiley
>             Fix For: 4.10
>
>         Attachments: SOLR-6183__BBoxFieldType.patch, 
> SOLR-6183__BBoxFieldType.patch
>
>
> This introduces a new BBoxField configured like so:
> {code:xml}
>     <fieldType name="bbox" class="solr.BBoxField"
>                numberType="tdouble" units="degrees"/>
> {code}
> It's a field type based on the same backing as the other Solr 4 spatial field 
> types (namely RPT) and thus it inherits the same way to use it, plus what is 
> unique to this field.  Ideally, the numberType would point to double based 
> field type configured with docValues=true but that is not required.  Only 
> TrieDouble no float yet.
> This strategy only accepts indexed rectangles and querying by a rectangle.  
> Indexing a rectangle requires WKT:
> {{ENVELOPE(-10, 20, 15, 10)}} which is minX, maxX, maxY, minY (yeah, that 'y' 
> order is wacky but it's not my spec).  This year I hope to add indexing 
> {{\['lat,lon' TO 'lat,lon']}} but it's not in there yet.
> To query using it's special area overlap ranking, you have to use the special 
> 'score' local-param with a new value like so:
> {{q=\{!field f=bbox score=areaOverlap 
> queryTargetProportion=0.25}Intersects(ENVELOPE(10,25,12,10))}}
> The queryTargetProportion defaults to 0.25 to be roughly what GeoPortal uses 
> (although GeoPortal actually has a different formula).  This default weights 
> 1 part query factor to 3 parts target factor.
> Add debug=results to see useful "explain" info.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to