- use a stable index checkpoint with creation + name so rows are not skipped
- fetch more BM25 matches before reranking, then return the top MAX_SEARCH_RESULTS
- add stable tie-breakers in reranking (BM25 and original rank)
- improve title matching by checking full words instead of substrings
- remove abs normalization in base score
* fix(contact): force type check in contact whitelisted methods
* fix(google_indexing): force type check in google_indexing whitelisted methods
* fix(assignment_rule): add type checks to assignment_rule whitelisted methods
* refactor: remove unused args
* fix(queue): add type hints to whitelisted methods in queue.py
* fix(auto_email_report): add type hints to whitelisted methods
* fix(dashboard): add type hints to whitelisted methods
* fix(sidebar_item_group): add type hints to whitelisted methods
* fix(weasyprint): add type hints to whitelisted methods
* fix(backups): add type hints to whitelisted methods
* fix(document_naming_settings): add type hints to whitelisted methods
* fix(get_latest_submissions): add type hints to whitelisted methods
* fix(custom_field): add type hints to whitelisted methods
* fix(customize_form): add type hints to whitelisted methods
* fix(personal_data_deletion_request): add type hints to whitelisted functions
* fix(__init__): add type hints to whitelisted methods
* fix(prepared_report): add type hints to whitelisted methods
* fix(session_default_settings): add type hints to whitelisted methods
* fix(document_follow): add type hints to whitelisted methods
* fix(route_history): add type hints to whitelisted methods
* fix(form_tour): add type hints to whitelisted methods
* fix(dashboard_settings): add type hints to whitelisted methods
* fix(address): add type hints to whitelisted methods
* fix(contact): add type hints to whitelisted methods
* fix(discussion_reply): add type hints to whitelisted methods
* fix(auto_repeat): add type hints to whitelisted methods
* fix: add the missing type hints and misc. corrections
* fix(email): add type hints to whitelisted methods
* fix(permitted_documents_for_users): add type hints to whitelisted methods
* fix: correct the type hints
* fix: int PK types
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
* perf: preload mysqlclient
Now the default choice instead of PyMySQL.
* perf: Lazy load JWT
OAuth is not used that frequently, on that many sites.
* perf: Lazy load whoosh
Rarely loaded
- Abstract SQLiteSearch base class with full-text search
- Spelling correction, recency boosting, and custom scoring
- Supports search filtering and configurable document indexing
- hooks for auto-indexing
- build index after migrate
- build index (if not exists) every 15 mins
- update doc index on_update
- remove doc index on_trash
While list/dict both work and technically so does a tuple,
the original intention in #13831 seems to have been a dict.
A trailing comma got left behind, which changed it to a tuple.
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* refactor: constitute unit test case
* fix: docs and type hints
* refactor: mark presumed integration test cases explicitly
At time of writing, we now have at least two base test classes:
- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase
They load in their perspective priority queue during execution.
Probably more to come for more efficient queing and scheduling.
In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.
* feat: Move test-related functions from test_runner.py to tests/utils.py
* refactor: add bare UnitTestCase to all doctype tests
This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
FullTextSearch uses name and content
WebsiteSearch uses title and content
Tests were failing because of hardcoded fieldnames which can't be
overridden by inheriting class without rewriting search function.
Made a separate function for defining search fields.
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.