NIH | National Cancer Institute | NCI Wiki  

When you perform a query, the system requires it in the context of a compoundQuery element with a join operator, even if it contains only one simple query. A simple query consists of the following parts:

  • attribute or attributeMatch
  • value
  • operator
  • levelFilter (optional)

The following example simple query finds only the collections or data files registered by the jane_doe user:

      {
		"compoundQuery":	{
			"operator":"AND",
			"queries":	[
					{
				"attribute":"registered_by",
				"value":"jane_doe",
				"operator":"EQUAL"
					}
				]
			}
      }

The following example simple query finds only the collections or data files, at level 1 or above, in which any attribute equals jane_doe:

      {
		"compoundQuery":	{
			"operator":"AND",
			"queries":	[
					{
				"operator":"EQUAL",
				"value":"jane_doe",
				"levelFilter":{"level":1,"operator":"NUM_GREATER_OR_EQUAL"},
				"attributeMatch":"ANY"
					}
				]
			}
      }

For the operator within each simple query, the valid values are as follows:

  • EQUAL
  • NOT_EQUAL
  • LIKE
  • NUM_LESS_THAN
  • NUM_GREATER_THAN
  • NUM_LESS_OR_EQUAL
  • NUM_GREATER_OR_EQUAL
  • No labels

2 Comments

  1. Anonymous

    If I were to write a query to search for all files with the extension ".bam" in a particular collection, can you supply me with an example?

    1. Hi Anonymous, 

      Thanks for asking.

      You can write such a query if your archive has a metadata attribute for the file type. For example, in the CCBR archive, searching for data objects with “attribute”: “file_type”, “value”: “BAM” would work.

      Feel free to reach out to NCIDataVault@mail.nih.gov with any questions. 

      Thanks,

      Ruth