YangCatalog / backend

YANG Catalog's REST API and internal module processing pipeline
https://yangcatalog.org
Apache License 2.0
2 stars 11 forks source link

Improve the grep search #692

Closed bskqd closed 1 year ago

bskqd commented 1 year ago

Now we have a problem with search strings that contain slashes, for example, such a search: typedef dscp {\n.*type uint8 will return this string for the next search: typedef dscp {\\n.*type uint8, which isn't right, so we should url encode the query string on the frontend and decode it on the backend. We also don't really need to search in the yindex Elasticsearch index but use the autocomplete index instead, yinxed has separate entries for each node in the yang module while the autocomplete index only has one entry per module with just the name, revision, and organization. We don't really need the rest of the information from the yindex entries, instead, we could link to the module's module details page that already contains all of that. This will help us lower response time.