The holy box of search
A holy box of search is a text input box, where you can type all the constraints that you want to search.
For example, if I want to search on a news database for news that has the word "India" in its title, the word "occupation" in its content, is dated between 1990 to 1992, and whose author is Shiv Shankar, I should swiftly be able to search this in the following way:
Title:India AND Content:occupation AND date:[1900-01-01 TO 1992-01-01] AND author:"Shiv Shankar"
For this kind of a search, the query string query is the weapon of our choice.
It gives us a variety of search options, which can be written as plain text. These features are discussed in the next section.
The field search
You can specify a particular field by the field:value
notation. If you don't specify any field, the search takes place on _all
, and if you have mentioned the field as the default_field
option under query_string_query
, would be taken.
The number/date range search
Using the following notation, you...