Boolean Query Parser
Boolean queries are used at many places in GarganText:
- searching for documents (Doc view), which uses the Postgres full text search
- making a corpus from local GarganText Database (Corpus Node feature)
- query a database with complex queries such as Arxiv: https://gitlab.iscpif.fr/gargantext/crawlers/arxiv-api/
For now we rely on the connected API parsers (which mostly use elastic search Query parser for instance) but we need our own in order to better connect any components.
In others words, we should be able to parse the queries in order to adapt it to any others specific languages used for any search.
The library https://github.com/np/boolexpr is a first step to enable this and arxiv-api gives some insights what are the possible expected semantics for complex queries.
Example of queries that should be parsed:
- A OR B
- A AND B
- A NOT B
- A AND B NOT C
- (A OR B OR C) AND (A' OR B' OR C') NOT (A'' OR B'' OR C'')
Besides such library (if not exist in Haskell ecosystem) would be a plus for the whole community.