Pharma Industry Data Collection

FREEMIUM
By TRAWLINGWEB DATA | Updated месяц назад | News, Media
Popularity

7.6 / 10

Latency

1,441ms

Service Level

100%

Health Check

N/A

Back to All Tutorials (3)

Basic Boolean queries

Boolean queries enables keywords combination, or even phrases, with the Boolean operators that follows:

Operator Use Exemple
x AND y The two words “x” and “y” must be presents in retrieved documents. “Paracetamol” AND “Bayer”
x OR y In the retrieved documents, it must be presents “x” or “y”. The use of () is recommended in order to avoid syntax errors. (“Paracetamol” OR “Novartis”)
NOT x Set up the order to not retrieve documents where “x” is contained. NOT “Bayer”

Parenthesis

Use () to embed OR statements in order to avoid errors in query time by the search engines. Otherwise, although the query can be effective, it can deliver unwanted data.

OR operator is interpreted as “It likes me one of the two terms at least.”

For example, (Barcelona OR Madrid OR París)

If user does not include all its declaration OR between parenthesis,
its search will work, but it will not work as expected.

Quotes

Quotes must be used to filter exact strings of more than a word. Otherwise, we can retrieve documents with only one of the string words but not with the whole string.

For example, if we set up the query string as q=White House without quotes, rather we will retrieve documents containing white and house in separated location than the two together one next to the other. In other words, result will be the same as in the case of the boolean query whiteANDhouse.

In order to avoid this problem we may use quotes (""). Whe some phrase is embed inside quotes, we’ll only retrieve those documents that contain this exact phase and no more else: the same words in the same order.

For example: “Casa Blanca” will allow us to retrieve only those documents that contain this exact phase.

Wildcards

Trawlingweb enables to use the * and ? characters in query expressions to search words without the need of write the whole word. This is highly usefull when the right form of the word is unknown, when the search string is too long or even when we want to retrieve documents that contains related words around an unique semantic root.

For example:

lavang* (retrieves lavanguadia)

*pais (retrieves elpais)

More information

More information about wildcards is avaiable in the complete Lucene’s syntax Manual.