Iām working on a project where Iāve created auto increment project numbers for projects. This works great!
However, I canāt seem to get the field to be searchable in the general search.
Iāve seen a few posts about this here but itās kind of confusing some say ānot to worry custom fields automatically get added to search indexā, other say you have to add to the vardef to enable it to be searchable like this: āforce_unifiedsearchā=>true, nothing seems to be working.
Iām wondering if itās because itās an integer field thats the problem.
Anyone ever done this? Have som tips?
I notice when I search for quote numbers (another auto increment field) it doesnāt work either?
I donāt know the answer, I am just speculating here, but could it be due to the moment (in the save process) when the index is updated?
Maybe the indexing happens before the hook that sets the auto-increment number?
It is also possible (likely, even) that there are some conditions to set some fields but not others, according to types, because some types it would not be profitable to search by them, maybe these need to be tweaked.
I noticed that case numbers, quote numbers, etc. Donāt get indexed (which would be nice). So what I ended up doing was just storing the project ID in another field project_id_txt and then the text field gets indexed and the records get found. Kind of a work around, but it works.
1 Like