https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31652

David Nind <da...@davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Text to go in the|This lays the ground work   |This lays the groundwork
      release notes|for geographical searching  |for geographical searching
                   |with Elasticsearch 7. This  |using Elasticsearch 7+.
                   |includes new search types   |This includes:
                   |for the Elasticsearch       |- New search
                   |search mappings to store    |types for Elasticsearch
                   |lat/lon and index them. The |search mappings to store
                   |QueryBuilder is extended to |latitude and longitude
                   |allow for building advanced |values and index them
                   |ElasticSearch querys (eg    |(using values from 034$s
                   |geo_distance) that cannot   |and 034$t).
                   |be represented in a simple  |- Extending the
                   |string query.
              |QueryBuilder to allow for
                   |
                           |building advanced
                   |To use the                  |Elasticsearch queries (for
                   |feature via the UI, a       |example, geo_distance) that
                   |plugin is needed that makes |cannot be represented in a
                   |use of the special queries. |simple string query.
                   |                            |
                   |                            |To
                   |                            |use this new feature now in
                   |                            |the OPAC, install and
                   |                            |enable the HKS3GeoSearch
                   |                            |plugin
                   |                            |(https://github.com/HKS3/HK
                   |                            |S3GeoSearch).

--- Comment #38 from David Nind <da...@davidnind.com> ---
I've made some edits to the release notes.

I was able to install the plugin, having the kpz available made that much
easier.

Results from searching:
1. I used the latitude and longitude from the test plan and added these to some
records.
2. The curl queries return the results as in the test plan (the lat and lon
values are in the Elasticsearch details).
3. If I search in the OPAC using the example query, the map appears, but it
says no search results found.
4. If I search for a word in the records, the map appears with search results,
but there are no pins showing on the map.

Is there something else I need to do?

Here is what I did (using KTD on the latest main, tested using ktd --es7 up and
jktd --es8 up):
1. Installed the plugin, enabled, and restarted everything.
2. Made 034$s and 034$t visible in the editor for the BKS framework.
3. Added some latitude and longitude values to two records (I used the values
from the test plan - lat=48.216, lon=16.395).
4. Checked that the mappings exist under Search engine configuration
(Elasticsearch) for geolocation_lat and geolocation_lon. They did, so I didn't
reset the mappings (I think that is right).
5. I reindexed, even though I'm not sure that this is required
(koha-elasticsearch --rebuild -d -b -a kohadev).
6. OPAC keyword search - searched with a keyword that returns the records I
added values to: 
   - Result ==> Map appears (without pins), with the search results including
the records with the latitude and longitude values
7. Direct query (from the test plan):
<opac-url>:8080/cgi-bin/koha/opac-search.pl?advsearch=1&idx=geolocation&q=lat:48.25+lng:18.35+distance:100km&do=Search
  . Result: Map appears, but no results
8. If I change the 100km to 1000km in the query, then the results are listed
and there is a pin for one of the records (but not the other).
9. Something else I noted: These details appear in the search box - lat:48.25
lng:18.35 distance:1000km. If I click the search button again, the URL is
changed so that it has %3A instead of a +, and there are no results
(<opac-url>:8080/cgi-bin/koha/opac-search.pl?idx=&q=lat%3A48.25+lng%3A18.35+distance%3A1000km&weight_search=1).

Apart from a very basic knowledge about latitude and longitude, I'm guessing
the query is saying give me any records that are X km from the latitude and
longitude.

Are you able to provide some latitude and longitude values that could be added
to some records, and the queries to use to display some pins on the map? (For
queries, either the values to enter in the advanced search form field, or the
direct query.)

This would make it easy for people to try it out with something that works.
(And it would be great to demonstrate all your hard work!)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to