Skip to content

Search binary_content node by field #1334

Description

@brnhffmnn

I'd like to query the /search/nodes API to find a node by filtering on the internal filename.

My usecase: I'm scanning the file system on the upload path. When I find a file, I want to derive from the file name the corresponding node.

I can't seem to find a working query.

Example

I see this file /uploads/0f/da/0fda9c4a910c43a3be1742800026f770.bin and want to get the corresponding node.

Knowing the correct node from the UI, I can query the API at project/nodes/812b3e6d34d1444790d38abb97a323fe and see it contains the matching UUID at fields.binary.binaryUuid:

...
"fields" : {
    "name" : "filename",
    "binary" : {
      "binaryUuid" : "0fda9c4a910c43a3be1742800026f770",
      "fileName" : "filename.jpg",
      "width" : 750,
      "height" : 700,
...

Question

It seems, everything below fields.binary is not indexed and therefor not searchable.

Is there any way (or meaningful workaround) to query nodes based on the binaryUuid field?

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