Skip to content

Improve full-text index

Camil Staps requested to merge improve-fulltext-index into main

What does this MR do?

Improves the full-text index in several ways to address cloogle-web#250 (closed) and cloogle-web#251 (closed). In particular:

  • Improve how the words in a query are combined; multiply instead of add scores to prefer results in which many words from the query are found.
  • Improve splitting words in camelCase names for full-text indexing.
  • Give constant weight to entry names in the full-text index (previously the weight of the name would depend on the length of the documentation, as they were included in the same index).
  • Include stopwords in the full-text entry when they occur in an entry name. This makes e.g. the function o searchable.

Changes to public APIs

None.

Author's checklist (required)

  • Intermediate commits compile (use git rebase -i main if not)
  • Newly added code has a style consistent with the rest of the repository
  • Newly added code is documented (guidelines)
  • If bugs have been solved, tests have been added (guidelines)
  • A changelog entry has been added (guidelines)

Related issues

Closes cloogle-web#250 (closed)
Closes cloogle-web#251 (closed)

Merge request reports