Get Result Paths
Turn a search into a list of file paths you can actually use
- results
- paths_list
- paths_newline
Not every workflow wants the images themselves. Sometimes you want to hand the results off to a script, a file-batch tool, or an external program - and that's what Get Result Paths is for. It takes a SEARCH_RESULTS object and emits the matching file paths as plain text in two flavors: paths_list (comma-separated, one line) and paths_newline (one path per line). Feed either into a Show Text node, a text-processing node, or any external tooling that eats comma or newline lists.
The mechanism is trivial - it iterates the result set in rank order and formats the file_path of each entry - which is exactly why it's useful. Paths are the pack's lingua franca: everything downstream that doesn't understand SEARCH_RESULTS can still consume plain text. Want to copy your top matches into a folder for review? Pipe paths_newline to a shell script or a file-copy utility. Want to log what a workflow found? paths_list into a text logger. This node is the "export" button of the pack.
Inputs
Required: results. Optional: max_results (default 50, up to 500) and include_scores (default false) - flip it on and each line becomes path,score / path score, which is handy when you're logging results or feeding a script that wants the similarity value too. Outputs: paths_list (comma-separated STRING) and paths_newline (newline-separated STRING).
Install
Same pack install as every node here - ComfyUI Manager (search "Semantic-Search") or git clone https://github.com/EricRollei/Semantic-Search into custom_nodes, install the requirements.txt deps, restart, nodes under Eric/SemanticSearch.
Where people get burned
- Expecting JSON or structured data. This node emits plain text lists, not structured output. If your downstream tool needs metadata beyond paths and scores, you're better off keeping the
SEARCH_RESULTSobject connected to the pack's own nodes and using this one only for the export path. max_resultstruncation surprise. It caps at 50 by default. If you need all 200 results, raise it - but remember it truncates from the top-ranked, so lowering it is a cheap "top N only" trick.- Scores on by accident. With
include_scoreson, the text no longer parses as a clean path list for naive tools. Toggle it per use, not per workflow. - Paths point at files that moved. Same caveat as Load Result Images - the index stores paths. If you've reorganized folders since indexing, the paths it hands you may be stale; re-index the moved folders to keep exports honest.
It's the smallest output node in the pack and the one that quietly does the most heavy lifting in real-world workflows - because "search found matches" rarely ends at the screen; it usually ends with a list of files somewhere doing something else.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| results | SEARCH_RESULTS | — | |
| max_resultsopt | INT | 501–500 | — |
| include_scoresopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| paths_list | STRING | — |
| paths_newline | STRING | — |