2023-09-15 15:31:46 +05:45
@tikaServiceNeeded
2023-08-29 14:51:48 +05:45
Feature: content search
2023-07-17 17:20:45 +05:45
As a user
2023-08-29 14:51:48 +05:45
I want to do search resources by content
2023-07-17 17:20:45 +05:45
So that I can find the files with the content I am looking for
Background:
2024-11-29 09:39:21 +05:45
Given user " Alice " has been created with default attributes
2023-07-17 17:20:45 +05:45
2025-09-17 10:35:26 +02:00
2023-07-17 17:20:45 +05:45
Scenario Outline: search files by content
Given using <dav-path-version> DAV path
And user " Alice " has uploaded file with content " hello world from nepal " to " keywordAtStart.txt "
And user " Alice " has uploaded file with content " saying hello to the world " to " keywordAtMiddle.txt "
And user " Alice " has uploaded file with content " nepal want to say hello " to " keywordAtLast.txt "
And user " Alice " has uploaded file with content " namaste from nepal " to " hello.txt "
When user " Alice " searches for " Content:hello " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| keywordAtStart.txt |
| keywordAtMiddle.txt |
| keywordAtLast.txt |
Examples:
2023-10-26 08:33:17 +02:00
| dav-path-version |
| old |
| new |
| spaces |
2025-09-17 10:35:26 +02:00
2023-10-26 08:33:17 +02:00
Scenario Outline: search files by different content types
Given using <dav-path-version> DAV path
And user " Alice " has uploaded file with content " Using k6, you can test the reliability and performance of your systems " to " wordWithNumber.md "
And user " Alice " has uploaded file with content " see our web site https://owncloud.com/infinite-scale-4-0 " to " findByWebSite.txt "
And user " Alice " has uploaded file with content " einstein@example.org want to say hello " to " findByEmail.docs "
When user " Alice " searches for " Content:k6 " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| wordWithNumber.md |
When user " Alice " searches for " Content:https://owncloud.com/ " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| findByWebSite.txt |
When user " Alice " searches for " Content:einstein@ " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| findByEmail.docs |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: search files by stop words when clean_stop_words is enabled (default)
Given using <dav-path-version> DAV path
And user " Alice " has uploaded file with content " He has expirience, we must to have, I have to find .... " to " fileWithStopWords.txt "
When user " Alice " searches for 'Content:" he has "' using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Brian " should not contain these entries:
| fileWithStopWords.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
2025-09-17 10:35:26 +02:00
@env-config
2023-10-26 08:33:17 +02:00
Scenario Outline: search files by stop words when clean_stop_words is disabled
Given using <dav-path-version> DAV path
2025-12-04 15:54:57 +05:45
And the config " SEARCH_EXTRACTOR_TIKA_CLEAN_STOP_WORDS " has been set to " false " for " search " service
2023-10-26 08:33:17 +02:00
And user " Alice " has uploaded file with content " He has expirience, we must to have, I have to find .... " to " fileWithStopWords.txt "
When user " Alice " searches for 'Content:" he has "' using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| fileWithStopWords.txt |
When user " Alice " searches for 'Content:" I have "' using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| fileWithStopWords.txt |
Examples:
2023-07-17 17:20:45 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-07-20 11:50:39 +05:45
2025-09-17 10:35:26 +02:00
2023-07-20 11:50:39 +05:45
Scenario Outline: sharee searches files by content
Given using <dav-path-version> DAV path
2024-11-29 09:39:21 +05:45
And user " Brian " has been created with default attributes
2023-07-20 11:50:39 +05:45
And user " Alice " has created folder " uploadFolder "
And user " Alice " has uploaded file with content " hello world from nepal " to " uploadFolder/keywordAtStart.txt "
And user " Alice " has uploaded file with content " saying hello to the world " to " uploadFolder/keywordAtMiddle.txt "
And user " Alice " has uploaded file with content " nepal want to say hello " to " uploadFolder/keywordAtLast.txt "
And user " Alice " has uploaded file with content " Namaste nepal " to " uploadFolder/hello.txt "
2024-05-08 14:22:52 +05:45
And user " Alice " has sent the following resource share invitation:
2024-05-06 15:21:50 +05:45
| resource | uploadFolder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
2024-07-25 18:09:28 +05:45
And user " Brian " has a share " uploadFolder " synced
2023-07-20 11:50:39 +05:45
When user " Brian " searches for " Content:hello " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Brian " should contain only these files:
2023-09-13 18:16:28 +05:45
| uploadFolder/keywordAtStart.txt |
| uploadFolder/keywordAtMiddle.txt |
| uploadFolder/keywordAtLast.txt |
2023-07-20 11:50:39 +05:45
Examples:
| dav-path-version |
| old |
| new |
2023-08-09 14:15:59 +05:45
| spaces |
2023-07-20 12:58:40 +05:45
2025-09-17 10:35:26 +02:00
2023-07-20 12:58:40 +05:45
Scenario Outline: search deleted files by content
Given using <dav-path-version> DAV path
And user " Alice " has created folder " uploadFolder "
And user " Alice " has uploaded file with content " hello world from nepal " to " uploadFolder/keywordAtStart.txt "
And user " Alice " has uploaded file with content " saying hello to the world " to " keywordAtMiddle.txt "
And user " Alice " has uploaded file with content " nepal want to say hello " to " keywordAtLast.txt "
And user " Alice " has deleted file " keywordAtLast.txt "
When user " Alice " searches for " Content:hello " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
2023-09-13 18:16:28 +05:45
| uploadFolder/keywordAtStart.txt |
| keywordAtMiddle.txt |
2023-07-20 12:58:40 +05:45
Examples:
| dav-path-version |
| old |
| new |
| spaces |
2023-07-25 14:54:27 +05:45
2025-09-17 10:35:26 +02:00
2023-07-25 14:54:27 +05:45
Scenario Outline: search restored files by content
Given using <dav-path-version> DAV path
And user " Alice " has created folder " uploadFolder "
And user " Alice " has uploaded file with content " hello world from nepal " to " keywordAtStart.txt "
And user " Alice " has deleted file " keywordAtStart.txt "
And user " Alice " has restored the file with original path " keywordAtStart.txt "
When user " Alice " searches for " Content:hello " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
2023-08-17 12:36:51 +05:45
| keywordAtStart.txt |
2023-07-25 14:54:27 +05:45
Examples:
| dav-path-version |
| old |
| new |
| spaces |
2023-08-09 14:15:59 +05:45
2025-09-17 10:35:26 +02:00
2023-08-09 14:15:59 +05:45
Scenario Outline: search restored version of a file by content
Given using <dav-path-version> DAV path
And user " Alice " has uploaded file with content " hello world " to " test.txt "
And user " Alice " has uploaded file with content " Namaste nepal " to " test.txt "
And user " Alice " has restored version index " 1 " of file " test.txt "
When user " Alice " searches for " Content:hello " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| test.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
2023-08-08 15:21:07 +05:45
2025-09-17 10:35:26 +02:00
2023-08-08 15:21:07 +05:45
Scenario Outline: search project space files by content
Given using spaces DAV path
And the administrator has assigned the role " Space Admin " to user " Alice " using the Graph API
2023-10-30 17:57:42 +05:45
And user " Alice " has created a space " project-space " with the default quota using the Graph API
2023-08-08 15:21:07 +05:45
And user " Alice " has created a folder " spacesFolderWithFile/spacesSubFolder " in space " project-space "
And user " Alice " has uploaded a file inside space " project-space " with content " hello world from nepal " to " keywordAtStart.txt "
And user " Alice " has uploaded a file inside space " project-space " with content " saying hello to the world " to " spacesFolderWithFile/keywordAtMiddle.txt "
And user " Alice " has uploaded a file inside space " project-space " with content " nepal want to say hello " to " spacesFolderWithFile/spacesSubFolder/keywordAtLast.txt "
And user " Alice " has uploaded a file inside space " project-space " with content " namaste from nepal " to " hello.txt "
And using <dav-path-version> DAV path
When user " Alice " searches for " Content:hello " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
2023-09-13 18:16:28 +05:45
| keywordAtStart.txt |
| spacesFolderWithFile/keywordAtMiddle.txt |
| spacesFolderWithFile/spacesSubFolder/keywordAtLast.txt |
2023-08-08 15:21:07 +05:45
Examples:
| dav-path-version |
| old |
| new |
| spaces |
2023-08-17 12:36:51 +05:45
2025-09-17 10:35:26 +02:00
2023-08-17 12:36:51 +05:45
Scenario Outline: sharee searches shared project space files by content
Given using spaces DAV path
2024-11-29 09:39:21 +05:45
And user " Brian " has been created with default attributes
2023-08-17 12:36:51 +05:45
And the administrator has assigned the role " Space Admin " to user " Alice " using the Graph API
2023-10-30 17:57:42 +05:45
And user " Alice " has created a space " project-space " with the default quota using the Graph API
2024-05-08 14:22:52 +05:45
And user " Alice " has sent the following space share invitation:
2024-05-06 15:21:50 +05:45
| space | project-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
2023-08-17 12:36:51 +05:45
And user " Alice " has created a folder " spacesFolderWithFile/spacesSubFolder " in space " project-space "
And user " Alice " has uploaded a file inside space " project-space " with content " hello world from nepal " to " keywordAtStart.txt "
And user " Alice " has uploaded a file inside space " project-space " with content " saying hello to the world " to " spacesFolderWithFile/keywordAtMiddle.txt "
And user " Alice " has uploaded a file inside space " project-space " with content " nepal wants to say hello " to " spacesFolderWithFile/spacesSubFolder/keywordAtLast.txt "
And user " Alice " has uploaded a file inside space " project-space " with content " namaste from nepal " to " hello.txt "
And using <dav-path-version> DAV path
When user " Brian " searches for " Content:hello " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result of user " Alice " should contain only these files:
| keywordAtStart.txt |
| spacesFolderWithFile/keywordAtMiddle.txt |
| spacesFolderWithFile/spacesSubFolder/keywordAtLast.txt |
Examples:
| dav-path-version |
| old |
| new |
2023-09-08 13:18:26 +02:00
| spaces |
2025-09-17 10:35:26 +02:00
2023-09-08 13:18:26 +02:00
Scenario Outline: search resources using different search patterns (KQL feature)
Given using spaces DAV path
And user " Alice " has uploaded file with content " hello world, let start to test " to " technical task.txt "
And user " Alice " has uploaded file with content " it's been hell " to " task comments.txt "
And user " Alice " has tagged the following files of the space " Personal ":
| path | tagName |
| technical task.txt | test |
When user " Alice " searches for ' <pattern> ' using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result should contain " <result-count> " entries
And the search result of user " Alice " should contain these entries:
| <search-result-1> |
| <search-result-2> |
2023-08-17 12:36:51 +05:45
Examples:
2023-09-08 13:18:26 +02:00
| pattern | result-count | search-result-1 | search-result-2 |
| Content:hello | 1 | /technical task.txt | |
| content:hello | 1 | /technical task.txt | |
| content:"hello" | 1 | /technical task.txt | |
| content:hel* | 2 | /technical task.txt | /task comments.txt |
| content:hel* AND tag:test | 1 | /technical task.txt | |
| (name:*task* AND content:hel*) NOT tag:test | 1 | /task comments.txt | |
2023-09-15 15:31:46 +05:45
2025-09-17 10:35:26 +02:00
2023-09-15 15:31:46 +05:45
Scenario Outline: search across files with different format with search text highlight
Given using <dav-path-version> DAV path
And the administrator has assigned the role " Space Admin " to user " Alice " using the Graph API
2023-10-30 17:57:42 +05:45
And user " Alice " has created a space " project-space " with the default quota using the Graph API
2023-09-15 15:31:46 +05:45
And user " Alice " has uploaded file with content " this is a simple text file " to " test-text-file.txt "
And user " Alice " has uploaded file with content " this is a simple pdf file " to " test-pdf-file.pdf "
And user " Alice " has uploaded file with content " this is a simple cpp file " to " test-cpp-file.cpp "
And user " Alice " has uploaded file with content " this is another text file " to " testfile.txt "
And user " Alice " has uploaded file " filesForUpload/testavatar.png " to " /testavatar.png "
And user " Alice " has uploaded a file inside space " project-space " with content " this is a simple markdown file " to " test-md-file.md "
And user " Alice " has uploaded a file inside space " project-space " with content " this is a simple odt file " to " test-odt-file.odt "
When user " Alice " searches for " Content:simple " using the WebDAV API
Then the HTTP status code should be " 207 "
And the search result should contain these entries with highlight on keyword " simple "
| test-text-file.txt |
| test-pdf-file.pdf |
| test-cpp-file.cpp |
| test-md-file.md |
| test-odt-file.odt |
But the search result of user " Alice " should not contain these entries:
| testavatar.png |
| testfile.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |