Skip to content

docs(config): correct 15.7 geolocation search against current implementation#323

Open
marevol wants to merge 1 commit into
masterfrom
docs-fix-15.7-geosearch
Open

docs(config): correct 15.7 geolocation search against current implementation#323
marevol wants to merge 1 commit into
masterfrom
docs-fix-15.7-geosearch

Conversation

@marevol

@marevol marevol commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Reviewed config/search-geosearch.rst (Geolocation Search) for 15.7 against the current Fess implementation, corrected the Japanese source, and propagated the changes to all languages (en, de, es, fr, ko, zh-cn).

Why

Several statements no longer matched the 15.7 code:

  • The doc used the v1 JSON API (/api/v1/documents), which was removed in 15.7 and consolidated into v2 (/api/v2/search). See api/api-overview.
  • The Google Maps example parsed the v1 response shape (response.result) instead of the v2 envelope (response.data).
  • The crawl-script example used invalid field-assignment syntax (doc.location = ...).

It also omitted important behavior:

  • The location field is not returned in API responses by default, so the Maps example silently produced no markers. query.additional.api.response.fields=location is required.
  • Geo search is applied as a filter (SearchEngineClient), so it narrows results but does not affect the relevance score and does not sort by distance (Fess has no distance sorting).

Changes

Corrections

  • /api/v1/documents/api/v2/search
  • v1 response (response.result) → v2 envelope (response.data)
  • crawl script doc.location = "..."location="..."
  • Replaced the unfounded "slower above 50km" claim with an accurate note (geo_point BKD indexing; tune num / radius)

Additions

  • Note that location must be added via query.additional.api.response.fields=location to appear in API responses
  • New "search result ordering" section: geo is a filter; no distance sorting
  • Clarified parameter naming geo.<field>.point / geo.<field>.distance and its link to query.geo.fields; the point/distance pairing rule
  • OR (same field, multiple points) vs AND (multiple fields) behavior
  • Additional accepted OpenSearch distance units (cm, mm, ft, in, nmi)

Verification

Verified against: GeoInfo.java, QueryFieldConfig.java, SearchEngineClient.java, fess_config.properties (query.geo.fields, query.additional.api.response.fields), fess_indices/fess/doc.json, and the api/v2 handlers.

Structural lint across all 7 files: section underline lengths, directive/code-block formatting, element counts (notes / code-blocks / list-tables), and :doc: references are consistent; no leftover Japanese remains in the translations.

…ntation

Verified search-geosearch.rst against the Fess 15.7 source code, fixed
inaccuracies in the Japanese document, and propagated the corrections to all
languages (en, de, es, fr, ko, zh-cn).

Corrections:
- API endpoint: the removed v1 JSON API (/api/v1/documents) is replaced with
  the current v2 search API (/api/v2/search). The v1 API was dropped in 15.7.
- API response handling: the Google Maps example now reads the v2 envelope
  (response.data) instead of the v1 shape (response.result).
- Crawl script syntax: field assignment uses `location="lat,lon"` instead of
  the invalid `doc.location = ...`.

Additions (previously missing):
- `location` is not returned in API responses by default; document the required
  `query.additional.api.response.fields=location` setting (the Google Maps
  example does not work without it).
- Geo search runs as a filter clause: it narrows results but does not affect
  score and does not sort by distance (Fess has no distance sorting).
- Request parameter names follow `geo.<field>.point` / `geo.<field>.distance`
  and track `query.geo.fields`; `point` and `distance` must be paired.
- Multiple points on one field are OR'd; multiple fields are AND'd.
- Additional OpenSearch distance units (cm, mm, ft, in, nmi) are accepted.

Fixes:
- Replace the arbitrary "slower above 50km" claim with an accurate note about
  geo_point BKD indexing and result-count/response-size considerations.

Sources: GeoInfo.java, QueryFieldConfig.java, SearchEngineClient.java,
fess_config.properties (query.geo.fields, query.additional.api.response.fields),
fess_indices/fess/doc.json, api/v2 handlers.
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.

1 participant