Skip to content

Support disjunction (or) in queries #45

@JeroenSoeters

Description

@JeroenSoeters

What problem does this solve?

Currently the query engine in formae compounds every item in a query (e.g. id:12345) into a single SQL AND query in the agent. This means you cannot do things like:

  • showing the status of multiple commands by id
  • extracting a group of resources by id

because the query id:123 id:456 would translate to `WHERE id = '123' AND id = '456'.

This is inconvenient as there are a variety of scenarios in which this type of query would be useful.

Proposed solution

We use a subset of the Bleve query syntax. A Bleve query consists of three list of "items": MUST, SHOULD and SHOULD NOT. In the query syntax these are expressed by a +, - or the absence of those modifiers. formae does support the + modifier yet. Instead, the current implementation treats all query items as MUST (+). Instead we should treat items without the modifier as SHOULD, and start supporting the + modifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions