Search binary_content node by field
- Dominant language
- Java
- Stars
- 593
- Forks
- 123
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 4
Description
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`:
```json
...
"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?
Contributor guide
Research direction
Start with the /search/nodes API and compare it with the project/nodes/{uuid} response shown in the issue, focusing on fields.binary.binaryUuid and the internal filename. Trace how searchable node fields are defined, then verify that a query can locate the matching binary node or that a documented workaround is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, search
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100