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

01-Jul-2017 3802
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.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle