Skip to content

Conversation

@abegehr
Copy link
Contributor

@abegehr abegehr commented Aug 27, 2025

I tried the filter with gt: "user/1//", however that didn't yield any files from "user/1/". When I exclude the second "/", it works as expected. I think the issue is that for files directly in the folder, the gt with trailing "/" doesn't catch, since the folder is exactly "user/1/", not "user/1/…".

Sample response.data from AutoRAG:

  [
    {
      file_id: 'cb9b94f5-cc24-410f-97b0-8a1d7eb76613',
      filename: 'user/1/summer_clothing_line.csv',
      score: 0.642221,
      attributes: {
          timestamp: 1756299780000,
          folder: "users/1/",
          filename: "summer_clothing_line.csv"
      },
      content: []
    }
  ]

Summary

Fix the "Starts with" filter for folders section for files directly in the folder.

Screenshots (optional)

Documentation checklist

I tried the filter with `gt: "user/1//"`, however that didn't yield any files from "user/1/". When I exclude the second "/", it works as expected. I think the issue is that for files directly in the folder, the `gt` with trailing "/" doesn't catch, since the folder is exactly "user/1/", not "user/1/…".

Sample `response.data` from AutoRAG:

```json
  [
    {
      file_id: 'cb9b94f5-cc24-410f-97b0-8a1d7eb76613',
      filename: 'user/1/summer_clothing_line.csv',
      score: 0.642221,
      attributes: {
          timestamp: 1756299780000,
          folder: "users/1/",
          filename: "summer_clothing_line.csv"
      },
      content: […]
    }
  ]
```
@abegehr
Copy link
Contributor Author

abegehr commented Aug 27, 2025

In the sample from the docs, with the following folder structure:

Screenshot 2025-08-27 at 3 42 51 PM

and using the mentioned filters:

filters: {
    type: "and",
    filters: [
      {
        type: "gt",
        key: "folder",
        value: "customer-a//",
      },
      {
        type: "lte",
        key: "folder",
        value: "customer-a/z",
      },
    ],
  },

it wouldn't include the profile.md file.

To include the profile.md file, gt needs to be "customer-a/" (single "/", not double):

filters: {
    type: "and",
    filters: [
      {
        type: "gt",
        key: "folder",
        value: "customer-a/",
      },
      {
        type: "lte",
        key: "folder",
        value: "customer-a/z",
      },
    ],
  },

@abegehr
Copy link
Contributor Author

abegehr commented Aug 27, 2025

UPDATE: It needs to be gte actually, to include the folder itself also.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Hey there, this pull request has been automatically marked as stale because it has not had recent activity. It will be auto-closed after and additional 10 days of inactivity. If you need it open for longer, add the label stale-exempt.

@github-actions github-actions bot added the stale label Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants