FIMS Queries

FIMS provides a custom sql-like query syntax to help you find the data you need.

By default, the query terms are executed against all columns in the project. To execute a query against a specific column, you can construct the query in the form columnName:query.

The full text search query japan would return all results where a column contains the word japan. Where as the full text search query column1:japan would return all results where column1 contains the word japan.

All queries can be constructed using the sql operators AND, OR, and NOT as well as groupings within ();

The query _expeditions_:myExpedition and not japan would return all results in the expedition myExpedition which do not contain the word japan.

Below you will find more information about the supported queries.

Supported Queries

The following queries are supported:

comparison

This query is used to compare 2 values. The following operators are supported:

NOTE: for correct comparison results when using <, <=, >, >=, the Attribute dataType should be one of (Integer, Float, Date, Datetime, Time). This can be set via the project configuration. Talk to your project administrator about this.

= - equals <> - not equals > - greater then >= - greater then or equal to < - less then <= - less then or equal to

project query

This query is will filter the results based on the project(s) that they belong to.

The query _projects_:1 would return everything uploaded under project 1 The query _projects_:[1, 2] would return everything uploaded under project 1 or 2

expedition query

This query is will filter the results based on the expedition(s) that they belong to. Note: as expeditions are only unique within a project, you most likely want to specify a project query as well.

The query _expeditions_:myExpedition would return everything uploaded under myExpedition The query _expeditions_:[myExpedition1, myExpedition2] would return everything uploaded under myExpedition1 or myExpedition2

_exists_ query

This query returns results where a column has a value.

The query _exists_:column1 would return all results where column1 has a value. The query _exists_:[column1, column2] would return all results where column1 or column2 has a value.

like query

This query performs a sql ILIKE (case-insensitive LIKE) query.

col1:"%value" - col1 ILIKE '%value'

phrase query

This query performs a sql ILIKE (case-insensitive LIKE) query.

col1:"some value" - col1 ILIKE '%some value%'

range query

This is a shorthanded way to perform a comparison query.

NOTE: for correct comparison results, the Attribute dataType should be one of (Integer, Float, Date, Datetime, Time) This can be set via the project configuration. Talk to your project adminstrator about this.

col1:[1 TO 10] - >= 1 AND <= 10 col1:[1 TO 10} - >= 1 AND < 10 col1:{1 TO 10} - > 1 AND < 10 col1:{* TO 100] - <= 100

select query

Used to select related parent/child data along with the queried entity. The provided value should be the conceptAlias of the Entity to select. The provided conceptAlias’ do need to be related to the query entity, but do not need to be directly related. For example, if you are querying a parent entity, you can also select the grandChildren and the grandParents. Any combination of related entities can be selected.

NOTE: _select queries should not be preceded/followed by and or or keywords and can not be preceded by the not keyword.

_select_:parentEntity - selects both child and parent entity results for the query _select_:[parentEntity, grandParentEntity] - selects both child and parent entity results for the query

Tokenization

Text fields go through a tokenization process before they are indexed. This process attempts to breakdown text into words and numbers as well as converting words to their normalized form.

Tokenization Ex:

"many donkeys" -> ["many", "donkey"]

For more information, you can view the psql tokenization.