Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6183

Add spatial BBoxField using BBoxSpatialStrategy

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.10, 6.0
    • spatial
    • None

    Description

      This introduces a new BBoxField configured like so:

          <fieldType name="bbox" class="solr.BBoxField"
                     numberType="tdouble" units="degrees"/>
      

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dsmiley David Smiley
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment