-
Notifications
You must be signed in to change notification settings - Fork 76
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
Index RPT geospatial fields following upstream #713
base: develop
Are you sure you want to change the base?
Index RPT geospatial fields following upstream #713
Conversation
Thanks @lucafavatella! Settings---
minimum_reviewers: 2
build_steps:
- make clean
- make test
- make xref
- make dialyzer
merge: false
org_mode: true
timeout: 1790 |
`RPT` appears to be an improvement over `LatLonType` and is [in Solr >= 4.0.0][1]. [1]: https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.3.0/solr/CHANGES.txt#L8649 Schema excerpts are mostly taken from Solr 6.3.0: * https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.3.0/solr/server/solr/configsets/basic_configs/conf/managed-schema#L157 * https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.3.0/solr/server/solr/configsets/basic_configs/conf/managed-schema#L557-L562 The schema excerpts from Solr 6.3.0 are adapted in order to work with the Solr versions integrated with Riak 2.2.0 and 2.0.7 i.e. respectively Solr 4.10.4 and 4.7.0. The only change involves the distance unit. Distance unit ==== Attribute name ---- In order to support Solr 4.10.4 and 4.7.0, prefer (now [deprecated][2]) attribute `units` over `distanceUnits` introduced in Solr 6. [2]: apache/lucene-solr@8fd247c Degrees vs. kilometers ---- Specify unit `degrees` rather than `kilometers` because that is the only one supported in Solr 4.10.4 and 4.7.0. Consequently adapt attribute `maxDistErr`: `maxDistErr="0.001" distanceUnits="kilometers"` can be written roughly as `maxDistErr="0.000009" units="degrees"`. * From [Solr 4.7.0 reference guide][3] wrt `maxDistErr` (BTW this excerpt is the same in Solr 4.10.4 ref guide): > Defines the highest level of detail required for indexed data. If > left blank, the default is one meter – just a bit less than > 0.000009 degrees. This setting is used internally to compute an > appropriate maxLevels (see below). [3]: https://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-4.7.pdf * See also [Solr schema change from degrees to kilometers][4]; [4]: apache/lucene-solr@8fd247c#diff-097da721a526b8f1f57d503942262d68 * The source code computes the [default number of degrees][5] converting 0.001 km (i.e. 1 m) to degrees assuming a [spherical Earth][6] model of radius [6371.0087714 km (Earth mean radius)][7]. * The computation relies on [`spatial4j`][8] [0.4.1][9] `DistanceUtils.dist2Degrees` function. (I did not verify that `0.000009` is the result of that expression.) [5]: https://github.com/apache/lucene-solr/blob/releases/lucene-solr/4.7.0/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeFactory.java#L86 [6]: https://github.com/locationtech/spatial4j/blob/spatial4j-0.4.1/src/main/java/com/spatial4j/core/distance/DistanceUtils.java#L480 [7]: https://github.com/locationtech/spatial4j/blob/spatial4j-0.4.1/src/main/java/com/spatial4j/core/distance/DistanceUtils.java#L60 [8]: https://github.com/apache/lucene-solr/blob/releases/lucene-solr/4.7.0/solr/core/ivy.xml#L37 [9]: https://github.com/apache/lucene-solr/blob/releases/lucene-solr/4.7.0/lucene/ivy-versions.properties#L40
There seems to be an issue with build step **make_test** ! ☁️✅ MERGE
✅ MAKE_CLEAN
⛔ MAKE_TEST
✅ MAKE_XREF
✅ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
I performed a minor change in the commit message. |
Make test failure seems unrelated to this PR:
|
There seems to be an issue with build step **make_test** ! ☁️✅ MERGE
✅ MAKE_CLEAN
⛔ MAKE_TEST
✅ MAKE_XREF
✅ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
Looks good! 👍✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_TEST
✅ MAKE_XREF
✅ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
Tests pass. This looks still applicable, useful for e.g. demos or jump-starting on geolocation data storage in Riak, and ready to be merged. |
Looks good! 👍✅ MERGE
✅ MAKE_CLEAN
✅ MAKE_TEST
✅ MAKE_XREF
✅ MAKE_DIALYZER
⬜ 0 of 2 Code reviews from organization basho |
I tried spatial search and I reviewed the default schema on this topic - hence the PR.
RPT
seems better thanLatLonType
hence worth to put in the default schema - even if only for demos and such;Please refer to commit message for details.