Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/records/native_bm25.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ func (s *Store) nativeLexical(ctx context.Context, v *querySelection, query stri
if len(terms) == 0 {
return ids, true, nil
}
rows, err := s.readDB().QueryContext(ctx, `SELECT rowid FROM lexical_fts WHERE lexical_fts MATCH ? ORDER BY bm25(lexical_fts)`, strings.Join(terms, " OR "))
// rowid breaks bm25() ties, so records of one score keep the write order
// whatever the timing of the index's background build (segment layout).
rows, err := s.readDB().QueryContext(ctx, `SELECT rowid FROM lexical_fts WHERE lexical_fts MATCH ? ORDER BY bm25(lexical_fts), rowid`, strings.Join(terms, " OR "))
if err != nil {
return nil, false, err
}
Expand Down
26 changes: 0 additions & 26 deletions web/dist/assets/GraphView-CNp1jlCw.js

This file was deleted.

26 changes: 26 additions & 0 deletions web/dist/assets/GraphView-LqJspvLW.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading