Skip to content

OpenAPI add OR logical operator doc and examples #40

@rduyme

Description

@rduyme

Doc and examples

OpenAPI add :

  • OR logical operator

Proposition : alignment with OpenAlex simple operators ( see https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/filter-entity-lists ) using :

  • in filter value : | means OR
  • coma between filters means AND
  • in filter value : + means AND

Examples :

  • UC_1 : title contains ocean => filter=cf.search.title:ocean
  • UC_2 : product type is publication OR dataset OR software => filter=product_type:publication|dataset|software
  • UC_3 : title contains pacific OR title contains atlantic => filter=cf.search.title:pacific|atlantic
  • UC_3 : title contains sweden OR title contains swedish => filter=cf.search.title:sweden|swedish
  • UC_4 : title contains ocean AND title contains atlantic => filter=cf.search.title:ocean,cf.search.title:atlantic ( and we also support : filter=cf.search.title:ocean+atlantic )
  • UC_5 : title contains ocean AND product type is publication => filter=cf.search.title:ocean,product_type:publication
  • UC_6 : title contains ocean AND title contains atlantic AND product type is publication => filter=cf.search.title:ocean,cf.search.title:atlantic,product_type:publication ( and we also support : filter=cf.search.title:ocean+atlantic,product_type:publication )

Note the following query can be sent. but it will not return any record. (it is not possible to have 2 different product_type )

  • product type is publication AND dataset => filter=product_type:publication,product_type:dataset

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions