Build a query parser (using Ruby, Parslet, and Elasticsearch)

However, it's better to write your own query parser, for two reasons. First, built-in parsers are too powerful. They are confusing and allow users to trigger expensive queries that kill performance. Second, built-in parsers are too generic. There is a tension between queries that are safe to execute and giving users a powerful query language—which they expect. However, built-in query parsers tend to be all-or-nothing: either they are safe, or they provide extraordinary power that can be too dangerous to expose. You can't select only the features you need. When you control your own parser, you can add features to it and customize your application's search behavior for your users.
Build a query parser (using Ruby, Parslet, and Elasticsearch) #ruby #rubydeveloper #rubyonrails #elasticsearch) https://rubyonrails.ba/single/build-a-query-parser-using-ruby-parslet-and-elasticsearch

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles