Skip to content

Search space ambiguity in cases where keywords can occur in either entities or metadata #398

@tyarkoni

Description

@tyarkoni

The derivatives spec encourages some keywords to be used in either filenames or JSON sidecars, without necessarily mandating one or the other. For instance, I believe space is mandatory for many files, but the spec allows that the information can be contained in JSON rather than filenames. So, if someone does this:

files = layout.get(subject='01', space='MNI152', extensions='.nii.gz')

...then currently space will be treated as a filename entity and metadata will never be inspected for space. This means there's no way to specify a disjunction over filenames and metadata.

Unfortunately, allowing disjunctions would reduce the efficiency of the search/indexing process considerably, because we would need to pre-index metadata for all files up front, instead of using the current approach (only checking metadata for files that match the entity-level constraints, and caching any inspected file for future use). But that would at least make the implementation of the fix relatively simple.

See also #397 for a related discussion.

Metadata

Metadata

Assignees

No one assigned

    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