You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expectedfull text search
create_full_text_index, sync_bm25_index and resync_bm25_index expand each result's @id to a full IRI (extract_prefix_map + expand_ids_in_results) before touching the index, so a document has one key whichever path wrote it. sync_bm25_index_to doesn't: it passes the results of execute_bm25_indexing_query_historical straight to Bm25IndexBuilder::add_results. With "@context": {"ex": "http://example.org/"} in the indexing query, a snapshot built by sync_bm25_index_to keys a document as ex:c rather than http://example.org/c.
Effect
Lookups by full IRI miss that snapshot's documents, and its search results use the compact form.
When that snapshot is the head, the next incremental sync matches the subjects it affects by full IRI. It should then write full-IRI keys next to the compact ones, leaving one index with both spellings until a full resync. That is the problem the comment above expand_ids_in_results in the incremental path describes. This consequence is read from the code; it hasn't been reproduced.
Fix
Expand the ids in sync_bm25_index_to as the other paths do, and pin it with a test that reads the document keys after a sync to a t.
P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expectedfull text search
Activity