Hi there,
I have a collection for 'Staff' and I've created a profile within this collection named 'autocomplete'. On the front end I'm able to get a set of suggestions back for this profile, however it suggests some fields which I don't want to be suggested on.
Ideally I only want to autocomplete to find results on the FirstName, Surname and JobTitle. I've looked at the json being returned from suggest.json endpoint and looking through some of the documentation i need this to be a json string with the FirstName, LastName and JobTitle so I can include this in the auto complete template. At the moment its just returning text I don't want the department to be suggested for example. Whats returns is below -
{
"key": "billy dum",
"disp": "billy dum",
"disp_t": "T",
"wt": "1",
"cat": "",
"cat_t": "",
"action": "",
"action_t": "S"
},
{
"key": "billy no",
"disp": "billy no",
"disp_t": "T",
"wt": "1",
"cat": "",
"cat_t": "",
"action": "",
"action_t": "S"
},
I've tried to add the padre_opts.cfg file with the below added.
-SM=meta -SF=[preferedname,lastname,jobtitle] -log=false -vsimple=true -bb=false -countgbits=63 -spelling=off -show_qsyntax_tree=off -qsup=off -rmcf=[disabled] -num_ranks=10
If i then run a search using sample.flt in the results i only see the fields above is which i think is correct.
I've tried to add the auto-completion.csv file but ideally i don't want to be copying up-to-date data in here. I'm starting to think i've took the totally wrong approach and there must be an easier way to limit the autocomplete results to certain metadata or something?
Anyone any idea or came across any good guides online?
Thanks!