bibhuti230185 opened a new issue, #6054:
URL: https://github.com/apache/couchdb/issues/6054
### Version
3.5.1
### Describe the problem you're encountering
After upgrading CouchDB to **3.5.2** (official Docker image, default config)
which ships Nouveau enabled by default at index format version **10**),
creation of a brand-new Nouveau index fails with:
```
nouveau_index_manager: db:sw360db ddoc:_design/lucene index:restrictedSearch
failed with: {error,{bad_request,<<"Cannot create a new version 9
index">>}}
```
According to the 3.5.2 release notes, version 10 is the new default and
clients should not need to specify a version explicitly for newly created
indexes. However, on a clean target database (no pre-existing Nouveau index
state), CouchDB still treats the request as a "version 9" index and rejects it.
### Expected Behaviour
### Expected
The index is created at the current default format (version 10 per 3.5.2
release notes) and the query returns results.
### Actual
The request fails and CouchDB logs:
```
2026-06-23T11:06:36.603073Z nonode@nohost <0.482.0> --------
nouveau_index_manager: db:sw360db ddoc:_design/lucene
index:restrictedSearch failed with:
{error,{bad_request,<<"Cannot create a new version 9 index">>}}
```
The index is never built and search is unusable.
### Steps to Reproduce
1. Start a fresh CouchDB 3.5.2 with Nouveau enabled (no leftover `nouveau/`
data directory).
2. Create a database, e.g. `sw360db`.
3. `PUT /sw360db/_design/lucene` with a Nouveau design document of the form
below — note that **no `version` field is included** anywhere (this matches the
SDK / current docs):
```json
{
"_id": "_design/lucene",
"nouveau": {
"restrictedSearch": {
"index": "function(doc) { if(!doc.type) return; /* ... */
index('text','default', objString, {'store': true}); }"
},
"all": {
"index": "function(doc) { /* ... */ }"
}
}
}
```
4. Trigger the first query against the index, e.g. `GET
/sw360db/_design/lucene/_nouveau/restrictedSearch?q=*:*`.
### Your Environment
| Item | Value |
|------|-------|
| CouchDB version | 3.5.2 (official Docker image, default config) |
| Nouveau | Enabled (bundled, default) |
| OS | Linux x86_64 |
| Client | [Eclipse SW360](https://github.com/eclipse-sw360/sw360) using
`org.eclipse.sw360.nouveau` design documents via Cloudant Java SDK |
| Java | 21 |
| Previous working CouchDB | earlier 3.5.x |
### Additional Context
## Why this looks like a bug
- The 3.5.2 release notes state that **version 10 is the default**, implying
clients that don’t specify a version should get a version-10 index.
- The error message says "Cannot create a new version 9 index" — but the
client never asked for version 9. This implies Nouveau is defaulting the
missing/unspecified `version` field to **9** while simultaneously refusing to
create version-9 indexes for new design documents. That combination makes it
impossible to create any new index from a client that follows the documented
JSON schema.
- We verified in our codebase
([`NouveauIndexFunction.java`](https://github.com/eclipse-sw360/sw360/blob/main/libraries/nouveau-handler/src/main/java/org/eclipse/sw360/nouveau/designdocument/NouveauIndexFunction.java))
that only the fields `index`, `default_analyzer`, and `field_analyzers` are
sent, per [the
documentation](https://docs.couchdb.org/en/latest/api/ddoc/nouveau.html#db-design-ddoc-nouveau-index).
No `version` is documented as required.
## Workarounds we have tried
- Deleted any pre-existing `nouveau/` data directory → still fails.
- Re-created the database from scratch → still fails.
- Recreated the `_design/lucene` ddoc with a fresh `_rev` → still fails.
- We have **not** found a way to make this work without manually adding
`"version": 10` to every nouveau index definition, which is not documented as
required and was not necessary in prior 3.5.x releases.
## Questions for the maintainers
1. Is the default `version` for a newly-submitted Nouveau index supposed to
be **9** or **10** in 3.5.2?
2. If clients are now expected to send `"version": 10` explicitly, can this
be:
- documented in https://docs.couchdb.org/en/latest/api/ddoc/nouveau.html,
and
- reflected in a clearer error message (e.g. "index version field
missing; please specify \"version\": 10")?
3. Should existing version-9 indexes be auto-migrated, or is the only path
to drop and recreate them?
## Relevant logs
```
2026-06-23T11:06:36.603073Z nonode@nohost <0.482.0> --------
nouveau_index_manager: db:sw360db ddoc:_design/lucene
index:restrictedSearch failed with:
{error,{bad_request,<<"Cannot create a new version 9 index">>}}
```
https://github.com/eclipse-sw360/sw360-frontend/actions/runs/28165110905/job/83415011760#step:17:4123
## References
- Eclipse SW360 ticket: https://github.com/eclipse-sw360/sw360/issues/4314
- SW360 Nouveau handler module:
https://github.com/eclipse-sw360/sw360/tree/main/libraries/nouveau-handler
- CouchDB Nouveau docs: https://docs.couchdb.org/en/latest/ddocs/nouveau.html
Thanks for any guidance — happy to test patches against this repro.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]