[Cod-bugs] Authors matching in Optimade API

Mehmet Giritli - STFC UKRI mehmet.giritli at stfc.ac.uk
Mon Nov 17 16:08:23 EET 2025


Dear friends,

I am trying to use Optimade API to search using author names. But I noticed a behaviour which is a bit unexpected.

Consider this query:

authors.name HAS "A. Day"

The spec for HAS operator says that this should only match if there is an exact match, i.e., there is an author which is equal to "A. Day", in the record.

Here is COD's output:
https://www.crystallography.net/cod/optimade/references?filter=authors.name%20HAS%20%22A.%20Day%22

The single record above includes an author "A. Dayalan". However, I think this should not be the case.  It seems like "HAS" implementation behaves like what I would expect from "CONTAINS" implementation. But, this means that there is no way to get only the records which contain values we are explicit about.

That said, I also noticed that CONTAINS is not implemented for author.names at the moment:

https://www.crystallography.net/cod/optimade/references?filter=authors.name%20CONTAINS%20%22A.%20Day%22

To sum up my request, do you think it is possible to:


  1.
Change implementation of "author.names HAS" so that it allows only exact matching.
  2.
Implement "author.names CONTAINS" which is basically the current implementation you have for HAS.

I hope it made sense. Please let me know if there is a way to overcome this situation currently (e.g., to exact match an author) in your API.

Kind Regards,
Mehmet.




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.crystallography.net/pipermail/cod-bugs/attachments/20251117/e1415717/attachment.htm>


More information about the Cod-bugs mailing list