[
https://issues.apache.org/jira/browse/SOLR-6183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley updated SOLR-6183:
-------------------------------
Description:
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=overlapRatio
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.
was:
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.
> 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: 5.0, 4.10
>
> Attachments: SOLR-6183__BBoxFieldType.patch,
> 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=overlapRatio
> 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]