Now I want to use an autocomplete mechanism for these 4 fields in textbox
- Use copyfield to dump all the four fields into a single field and use that field for Autosuggest
Have to concatenate the values in these 4 fields into one string before showing a suggestion
- Keep the values as stored and the Concatenation can be done at client side.
Autocomplete on EdgeNGrams or wildcard searches on simple text indexes.
- EdgeNGrams is mostly index time and would provide faster search results, with an increased indexing time and index size
- Wildcards queries are slower, but would depend on the index size if its too small may not impact the performance much. Note - No Anaylsis is performed for wildcard queries.
- you can consider Solr terms for autosuggest. With Solr terms you would not get the original fields back but just the results but would be faster
- Also check Solr suggester