Natural Query Writer

An interface for building complex Boolean search queries in plain English

Angular

Issuing Boolean queries like like "sailboat AND (racing OR race)" is hard

This app makes writing complex/nested Boolean queries in plain English.

Incorporates 'Mad Libs' and Lego blocks for a unique search experience.


Natural Query Writer Repositoy

Motivation

This is the front end of a concept search interface built with Angular. It is connected with Wikipedia API for search term auto-complete.

During my graduate studies, I conducted research on search interfaces. I found that most academic and general-purpose search interfaces have two separate modes: one for issuing simple searches and another with advanced search options for complex Boolean queries (using terms such as AND, OR, NOT, date filter, etc.). I also discovered that issuing complex Boolean queries is quite difficult, as you need to understand the syntax and structure supported by the search engine.

To make it convenient for users to issue complex Boolean searches, I designed an interface that combines both types of queries into a single mode. My goal was to allow users to write complex Boolean queries in plain English, eliminating the need to learn Boolean search syntax. Additionally, the interface is designed to be user-friendly, starting with a single input box and allowing users to add new blocks (AND, OR, NOT, date filter, group) as they build their query sentence.

 

 

 

 

Figure 1: Initial view of the search interface. This view is a good place for quickly issuing a simple query.

 

 

 

 

 

 

Figure 2: The interface after adding a few Boolean input blocks.

 

I borrowed the concept of the 'Mad Libs' word game and Lego blocks to build an intuitive search interface. Users can start with a single input and then extend the search with modular, Lego-like input boxes by clicking the plus icon beside each input block. They can also create groups of blocks to construct nested Boolean search structures. As users continue to add blocks, the interface visually resembles an English sentence.

 

 

 

 

 

 

 

 

 

 

 

 

Figure 3: The tree visualization corresponds to the boolean query.

 

The interface also features a tree visualization underneath that shows how their nested Boolean query is structured.