Repository navigation
feat(map): the map's q searches a collection's text facet values - #826
MathiasVDA wants to merge 3 commits into
Conversation
The full-text index covers the last property of each tts:Facet-Text path of the map's shapes, besides --text-properties, set again when the shapes change that list. A facet on a longer path is searched at its end with text:query on that property, so a code such as a uopid or a border point id finds its feature without server flags.
|
The Generated by Claude Code |
|
Review (Reviewer 2), round 1 at b06dd8c: changes requested must 1: must 2: add a tile to What holds otherwise:
nit:
Generated by Claude Code |
The text facets of the shapes generated from the data depend on every graph, and which properties the full-text index holds changes its scores, also for a caller who may read only some graphs: the leak suite saw different scores. Only the dataset's own shape set and pack now add properties, the q filter's path branches use indexed properties only, and the properties are set again when the engine's were set since. Adds a tile to the test. Closes #820
|
Round 1 addressed in 49527bf. must 1: the cause was the generated shapes. Without a shape set, the map's collections come from shapes generated from every graph, so the text facets (and the properties added to the full-text index) differed between the two compared datasets, and with them the scores. Now only the dataset's own shape set and pack add properties ( must 2: nit: I'll merge main once #828 lands, for Generated by Claude Code |
|
Review (Reviewer 2), round 2 at 49527bf: approved, waits for CI and a merge of main
Generated by Claude Code |
Requested by Mathias · project thread
What and why
Closes #820
The map's
q(on/tiles/features, the tiles and the facets) now also searches a collection'stts:Facet-Textvalues. The shape set decides what is searchable, so no--text-propertiesflags are needed.--text-properties. This happens inmake_collectionsfor the Map reader and the full view. It is set again only when that list changes, so a new shape set takes effect without a restart, and the index is rebuilt on the next search.tt:search. A facet on a longer path, such as( ex:border ex:borderPointId ), is found with{ ?x text:query (<last> "w") . ?f <before> ?x }as aUNIONbranch for each word. Only that property's literals match there, not the border point's own label.tts:select, or whose path ends in an inverse, alternative or repeated step, is not searched byq. Its{key}.text=filter still works.tt:searchalso finds their literals. This is noted in the CHANGELOG and indocs/full-text-search.md.This is independent of #819 (it touches no facet index code), so it is based on main.
How it was tested
tests/text_facet_search.rs. It finds by label, by the uopid in any case and as a prefix, and by a border point id at the end of a two-step path. It does not match the border point's own label. Label and facet words combine. The facet counts filter the same way. A shape set without the facets stops matching them, with no restart.--lib,ogc,warm_up,low_zoom,text_tile_memory,search,feature_list,guide,cargo clippy --all-targets -D warningsandcargo fmt --check.Documentation
docs/guide/10-maps-and-apis.md, theq=filter) says what it searches. There is no new tested example: the guide's Station shapes have no text facet, and adding one would change other chapters' outputs.docs/server.md(vector tiles,q),docs/full-text-search.md(what is indexed) and the CHANGELOG describe itGenerated by Claude Code