Skip to content

Prompt in search() and search_all() ignored, returns all images in dataset instead #360

Open

Description

@03vmate
rf = roboflow.Roboflow(api_key=API_KEY)
workspace = rf.workspace(WORKSPACE)
project = workspace.project(PROJECT_ID)

filename = "vlcsnap-2024-08-28-19h46m52s829.png"

results = []
for result in project.search_all(prompt=f'filename:"{filename}"'):
    results.extend(result)
print(len(results))

Running the code above returns every single image in the dataset, instead of just the one with the specific filename. Using the same query in the web UI returns the correct image:

loading Roboflow workspace...
loading Roboflow project...
5887

Image

Activity

  1. Ashp116 commented on Jun 15, 2025

    @Ashp116

    Hey, the search() and search_all() functions are intended for semantic search. According to the official documentation, "Semantic search happens when you enter a text query without any filter selectors (ex: filename:)". For more information, please see: Semantic search Roboflow documentation.

    I have also attached an image to illustrate how the functions behave.

    Image Image from docs.roboflow.com

    Additionally, I have submitted a pull request to address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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