-
Notifications
You must be signed in to change notification settings - Fork 55
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
Install Nextcloud 32.0.1.2 with fulltextsearch apps (v32.0.0).
Set up an Elasticsearch 8.x container.
Create an advanced index template in Elasticsearch that uses an n-gram analyzer for partial search (e.g., nc_partial_analyzer).
Configure Nextcloud to use this index and analyzer by setting:
fulltextsearch_elasticsearch index = nextcloud_smart_search (our custom index)
fulltextsearch search_fields = ["content^3", "content.partial"]
fulltextsearch analyzer = (empty, to use the index's default_field)
Run a full index with php occ fulltextsearch:index.
Try to search for a partial term (e.g., "nndc") from the web UI.
Expected behaviour
The fulltextsearch app should build a query that searches the content and content.partial fields for the term "nndc". The search should return the files that contain this partial string.
Actual behaviour
The search from the web UI fails and returns "No results."
The debug nextcloud.log shows that the fulltextsearch app is sending an empty query to Elasticsearch. The search term "nndc" is missing from the query body.
This is the most important log line:
JSON
{
"reqId": "hgQeFUIMJhx11uMQ5BSd",
"level": 0,
"app": "fulltextsearch_elasticsearch",
"method": "GET",
"url": "/ocs/v2.php/search/providers/fulltextsearch/search?term=nndc",
"message": "Searching ES",
"data": {
"app": "fulltextsearch_elasticsearch",
"params": "{"index":"nextcloud_smart_search","size":5,"from":0,"_source_excludes":"content","body":{"query":{"bool":{"must":[],"filter":[]}}}}"
}
}
As you can see, the "must":[] array is empty.
This proves the bug is in the Nextcloud app:
A direct curl test to the same index (nextcloud_smart_search) WORKS and finds the file.
The app's own command (occ fulltextsearch:search "ching" "nndc") also FAILS and returns * files: (0 results).
The app is not reading its configuration and is not passing the search term to Elasticsearch.
Server configuration
Web server: Apache (Official Nextcloud Docker Image)
Database: MariaDB
PHP version: (Included with official Nextcloud 32.0.1.2 Docker Image)
Nextcloud version: 32.0.1.2
List of activated apps
(Please run this command in your console and paste the output here)
su -s /bin/bash www-data -c 'php occ app:list'
Nextcloud configuration
(Please run this command in your console and paste the output here)
su -s /bin/bash www-data -c 'php occ config:list system'
FullTextSearch App Configuration:
$ su -s /bin/bash www-data -c 'php occ config:app:get fulltextsearch platform'
OCA\FullTextSearch_Elasticsearch\Platform\ElasticsearchPlatform
$ su -s /bin/bash www-data -c 'php occ config:app:get fulltextsearch_elasticsearch index'
nextcloud_smart_search
$ su -s /bin/bash www-data -c 'php occ config:app:get fulltextsearch search_fields'
["content^3", "content.partial"]
$ su -s /bin/bash www-data -c 'php occ config:app:get fulltextsearch analyzer'
(This is empty / not found)
Browser
Browser name: Microsoft Edge
Browser version: 142
Operating system: Windows 10