fast-autocomplete | Fast Autocomplete : When Elastcsearch suggestions | Autocomplete library
kandi X-RAY | fast-autocomplete Summary
kandi X-RAY | fast-autocomplete Summary
Fast autocomplete using Directed Word Graph (DWG) and Levenshtein Edit Distance. The results are cached via LFU (Least Frequently Used).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Generate a demo demo for the given modules
- Performs fuzzy search
- Find and sort the words in the given word
- Search for a given word
- Factory function for autocomplete factory
- Get data from a file
- Get all content from a file
- Simple compress function
- Populates the DawgNode
- Insert a word into the tree
- Insert a new node
- Insert a word callback
- Populate a redis client
fast-autocomplete Key Features
fast-autocomplete Examples and Code Snippets
Community Discussions
Trending Discussions on fast-autocomplete
QUESTION
Hello I have an app that have autocomplete suggestions for the user based on input in the search bar.
I use a package named fast_autocomplete which works great but I have a problem that each time I want to use the prediction I have to load 50MB of JSON data that I mad for the autocomplete (500K records). While running it on a server side loading, parsing and sending back the data is quite slow for what you would except for autocomplete functionality. It less than a second and right now (testing locally) its takes few seconds.
Checking the issue it seems that it takes a lot of time to load the 50MB JSON for each request. Loading the data and building the autocomplete object each time a new request comes in is a waste of time.
For that I wondered if there is a way to keep the object loaded alive all the time and when a new HTTP request comes in the JSON is already loaded. How big sites like Amazon, Ebay, Google makes there autocomplete so fast?
...ANSWER
Answered 2020-Sep-28 at 00:14If I understand correctly you're loading your data for every request despite that data staying the same for each user. Why not cache that data? or store it outside of your request handler's scope?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fast-autocomplete
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page