Open broofa opened 3 years ago
That's a great idea. This could be used in the search bar at the top.
Right now, the param "text" can be used to search all text fields (MongoDB feature), see motors.js:441. That was meant to be the general search feature., but it doesn't work very well. Feel free to replace this functionality.
After reading the API docs, I understand that the current API is a result of the legacy use case(s), where the search UI consisted of (I assume) combo-boxes for each of the relevant fields. However that style of UI is both hard to use, and not very... "modern".
A search API that supported a more modern interaction, ala Google's one-box where you type in free-form text, makes for a better user experience. To that end, I propose adding support for a "q" parameter that that would search for manufacturer / impulseClass / commonName / delay, as appropriate for these types of queries ...
... you get the idea. :-)
The use case for this would be a text input field that auto-suggests options as the user types. (which I'm in the process of implementing, in case you're seeing a lot of 400 errors in your logs... Sorry!)