Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 324 bboxrelevancy #765

Merged
merged 1 commit into from
Jan 31, 2019
Merged

Issue 324 bboxrelevancy #765

merged 1 commit into from
Jan 31, 2019

Conversation

ewlarson
Copy link
Member

This PR adds optional spatial search overlapRatio relevancy support. Configurable via the presence of Settings.OVERLAP_RATIO_BOOST.

When a bbox param is present, the Settings.OVERLAP_RATIO_BOOST value will boost results based on the overlap ratio of the result bboxes.

Includes a modification to our Solr schema to include a _bboxtype fieldtype. Requires Solr 7.4+

Thanks to:
@hudajkhan / Feature development
@ewlarson / Rspec tests

</schema>

<!-- for bbox value -->
<copyField source="*_geom" dest="*_bboxtype"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we assume that all *_geom fields can be copied into _*bboxtype? If I provide point data here, what happens?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't know... potentially "bad things". Instead of the wildcard copy, what specific field should be copied?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to test that out since that is something we should evaluate. If this copying over doesn't work for point fields, don't know if there is such a thing as a conditional copy possible in schema (i.e. If solr_geom is bbox-compatible, copy over)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out current schema uses the "ENVELOPE WKT" syntax in the solr_geom field which will copy over fine. Instead of copying all _geom fields, how about just solr_geom?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hudajkhan @mejackreed @eliotjordan We are all on the same page here. Let's limit the copy to just the solr_geom field. Want to push that commit @hudajkhan?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will make this change now.

@coveralls
Copy link

coveralls commented Jan 31, 2019

Coverage Status

Coverage increased (+0.009%) to 96.608% when pulling 1d9ff42 on issue-324-bboxrelevancy into 0354377 on master.

Copy link
Member

@eliotjordan eliotjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes a big difference in the quality of spatial search results. Thanks for all the hard work on this.

@ewlarson ewlarson force-pushed the issue-324-bboxrelevancy branch 2 times, most recently from a790c31 to 88b7ade Compare January 31, 2019 16:57
…able via the presence of Settings.OVERLAP_RATIO_BOOST.

When a bbox param is present, the Settings.OVERLAP_RATIO_BOOST value will boost results based on the overlap ratio of the result bboxes.

Includes a modification to our Solr schema to include a _bboxtype fieldtype. Requires Solr 7.4+

Co-Authored-By: hudajkhan <hudajkhan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants