[PR #1377] [MERGED] fix(nextcloud): use OCS API for recursive search #1859

Closed
opened 2026-02-16 10:24:12 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/1377
Author: @konashi574
Created: 7/29/2025
Status: Merged
Merged: 7/31/2025
Merged by: @crazywoola

Base: mainHead: fix/nextcloud/recursive-search


📝 Commits (2)

  • 3a6472a fix(nextcloud): use OCS API for recursive search
  • 6b67319 fix(nextcloud): bump version to 0.1.0 in manifest.yaml

📊 Changes

2 files changed (+137 additions, -150 deletions)

View changed files

📝 tools/nextcloud/manifest.yaml (+2 -2)
📝 tools/nextcloud/tools/search_files.py (+135 -148)

📄 Description

Related Issues or Context

Purpose of this change

  1. Bug fix – recursive search did not work when search_path contained sub‑folders.
  2. How it is fixed – replaced the WebDAV traversal logic with the Nextcloud OCS Search API (/ocs/v2.php/search/providers/files/search).
  3. Important note / behaviour changesearch_pattern is now treated as a keyword instead of a glob.
    • v0.0.1 (WebDAV):
      • *.txt → works
      • report → fails (needed *report*.*)
      • no recursive search
    • v0.1.0 (this PR, OCS):
      • *.txt → no longer works
      • report → works
      • recursive search → works
        This is compliant with the official OCS search specification

This PR contains Changes to Non-Plugin

  • Documentation
  • Other

This PR contains Changes to Non-LLM Models Plugin

  • I have Run Comprehensive Tests Relevant to My Changes

This PR contains Changes to LLM Models Plugin

  • My Changes Affect Message Flow Handling
  • My Changes Affect Tool Interaction Flow
  • My Changes Affect Multimodal Input Handling
  • My Changes Affect Multimodal Output Generation
  • My Changes Affect Structured Output Format
  • My Changes Affect Token Consumption Metrics
  • My Changes Affect Other LLM Functionalities
  • Other Changes (Add New Models, Fix Model Parameters etc.)

Version Control (Any Changes to the Plugin Will Require Bumping the Version)

  • I have Bumped Up the Version in manifest.yaml0.0.1 → 0.1.0

Dify Plugin SDK Version

  • I have Ensured dify_plugin>=0.2.0,<0.4.0 is in requirements.txt

Environment Verification (If Any Code Changes)

Local Deployment Environment

  • Dify Version is: 1.2.0. I have tested my changes on local deployment Dify with a clean environment that matches the production configuration.
    • Built the package with
      dify plugins package nextcloud-recursive-search
      
      → produced nextcloud-recursive-search-0.1.0.difypkg
    • Installed via Plugins → Upload in the Admin UI.
    • Verified:
      • keyword search returns matches inside nested folders
      • glob pattern behaviour matches the “Purpose” section above

SaaS Environment

  • I have tested my changes on cloud.dify.ai with a clean environment that matches the production configuration.
    • Uploaded the same .difypkg.
    • Plugin activates without errors and returns the same results as the local instance.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/1377 **Author:** [@konashi574](https://github.com/konashi574) **Created:** 7/29/2025 **Status:** ✅ Merged **Merged:** 7/31/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `fix/nextcloud/recursive-search` --- ### 📝 Commits (2) - [`3a6472a`](https://github.com/langgenius/dify-official-plugins/commit/3a6472a4e577fa68b96beea43d2dc03110f5eafb) fix(nextcloud): use OCS API for recursive search - [`6b67319`](https://github.com/langgenius/dify-official-plugins/commit/6b67319ca2cb949e4bfbeb882cb98f6d1ed81b0a) fix(nextcloud): bump version to 0.1.0 in manifest.yaml ### 📊 Changes **2 files changed** (+137 additions, -150 deletions) <details> <summary>View changed files</summary> 📝 `tools/nextcloud/manifest.yaml` (+2 -2) 📝 `tools/nextcloud/tools/search_files.py` (+135 -148) </details> ### 📄 Description ## Related Issues or Context <!-- ⚠️ NOTE: This repository is for Dify Official Plugins only. For community contributions, please submit to https://github.com/langgenius/dify-plugins instead. --> - **Fixes #1092** – “Recursive search does not descend into sub‑folders” Discussion: https://github.com/langgenius/dify-official-plugins/issues/1092#issuecomment-3130304871 **Purpose of this change** 1. **Bug fix** – recursive search did not work when `search_path` contained sub‑folders. 2. **How it is fixed** – replaced the WebDAV traversal logic with the **Nextcloud OCS Search API** (`/ocs/v2.php/search/providers/files/search`). 3. **Important note / behaviour change** – `search_pattern` is now treated as a *keyword* instead of a glob. * `v0.0.1` (WebDAV): * `*.txt` → works * `report` → fails (needed `*report*.*`) * no recursive search * `v0.1.0` (this PR, OCS): * `*.txt` → no longer works * `report` → works * recursive search → works This is compliant with the official OCS search specification --- ## This PR contains Changes to *Non-Plugin* - [ ] Documentation - [ ] Other ## This PR contains Changes to *Non-LLM Models Plugin* - [x] I have Run Comprehensive Tests Relevant to My Changes ## This PR contains Changes to *LLM Models Plugin* - [ ] My Changes Affect Message Flow Handling - [ ] My Changes Affect Tool Interaction Flow - [ ] My Changes Affect Multimodal Input Handling - [ ] My Changes Affect Multimodal Output Generation - [ ] My Changes Affect Structured Output Format - [ ] My Changes Affect Token Consumption Metrics - [ ] My Changes Affect Other LLM Functionalities - [ ] Other Changes (Add New Models, Fix Model Parameters etc.) --- ## Version Control (Any Changes to the Plugin Will Require Bumping the Version) - [x] I have Bumped Up the Version in `manifest.yaml` – **0.0.1 → 0.1.0** ## Dify Plugin SDK Version - [x] I have Ensured `dify_plugin>=0.2.0,<0.4.0` is in `requirements.txt` --- ## Environment Verification (If Any Code Changes) <!-- ⚠️ NOTE: At Least One Environment Must Be Tested. --> ### Local Deployment Environment - [x] Dify Version is: **1.2.0**. I have tested my changes on local deployment Dify with a clean environment that matches the production configuration. - Built the package with ```bash dify plugins package nextcloud-recursive-search ``` → produced **`nextcloud-recursive-search-0.1.0.difypkg`** - Installed via **Plugins → Upload** in the Admin UI. - Verified: - keyword search returns matches inside nested folders - glob pattern behaviour matches the “Purpose” section above ### SaaS Environment - [x] I have tested my changes on **cloud.dify.ai** with a clean environment that matches the production configuration. - Uploaded the same `.difypkg`. - Plugin activates without errors and returns the same results as the local instance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:24:12 -05:00
yindo closed this issue 2026-02-16 10:24:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1859