adam26d
1
Want to search a custom doctype from global search like below
Here’s what I’ve tried:
- Open the field
a. Select Index
b. Select In Global Search
- At the bottom of the form, checked Index Web Pages for Search
- bench --site my-site rebuild-global-search
- bench restart
- Reload (clear cache)
Still cant search these custom doctype fields in Global Search. Any clues?
Installed Apps
ERPNext: v14.10.0 (version-14)
Frappe Framework: v14.17.1 (version-14)
Have you tried to add custom doctype in hooks.py file ? As there is a variable called global_search_doctypes
global_search_doctypes = {
"Default": [
{"doctype": "CustomDocTypeName", "index": 40},
],
}
1 Like
adam26d
3
Thanks for your response I’ll try this. guessing ‘index’ is the field name?
‘Index’ is the not a field name but It’s like the sequence.
1 Like
adam26d
5
Like this?
global_search_doctypes = {
"Default": [
{"doctype": "Request", "index": 2},
{"doctype": "Speaker", "index": 3},
],
}
bench restart
bench --site my-site rebuild-global-search
Still not getting any results. Did I miss something?
adam26d
6
So Frappe 14 has a doctype called Global Search Settings. I simply added my doctypes to it and hit reload.
Thank you for the guidance @Hardik_Zinzu
1 Like