Skip to content

Configuration options discovered from source (documentation change suggestions)#9110

Open
ZakarFin wants to merge 4 commits intogeonetwork:mainfrom
ZakarFin:patch-1
Open

Configuration options discovered from source (documentation change suggestions)#9110
ZakarFin wants to merge 4 commits intogeonetwork:mainfrom
ZakarFin:patch-1

Conversation

@ZakarFin
Copy link

@ZakarFin ZakarFin commented Dec 1, 2025

Apparently documentation has moved to the main repository so I'm suggesting the changes made in geonetwork/doc#248 to be migrated to this documentation. We've been tinkering with GeoNetwork migration from 3.x to 4.x for some time now and looking at the code I noticed these configuration options as well. Also noticed that the indexes are by default prefixed with gn- (https://github.com/geonetwork/core-geonetwork/blob/4.2.13/pom.xml#L1565-L1569).

I'm not sure if you want to have links to source code in the documentation or if the defaults are different in the prepackaged versions of WAR-file or the Containerized setup. These are the ones that are defaulted when building from source. As we are migrating to 4.2.x before continuing to go for 4.4.x things might have changed, but at least raising awareness for someone more experienced with GN to take a look at the docs.

Maybe also take a look at this: geonetwork/doc#249 as it seems the path to encryptor.properties on the docs was wrong (in our experience).

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@github-project-automation github-project-automation bot moved this to Documentation ideas in Documentation Dec 1, 2025
@jodygarnett jodygarnett moved this from Documentation ideas to Review required in Documentation Dec 1, 2025
Alternative environment variables are also supported for non-container (WAR-file) environments:

``` text
GEONETWORK_DB_USERNAME=example
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would document also GEONETWORK_DB_TYPE

Copy link
Author

@ZakarFin ZakarFin Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a comment on the pom.xml that GEONETWORK_DB_TYPE could be set with env variables, but I'm not sure if that is true. It's handled differently and can be set with the Java System property that is the other suggested change to this file on the pull request. It's been a while so I can't remember if I actually tested, but I'm not sure how it would work based on the current pom.xml. It's probably done differently on the pom.xml to have a reasonable default value if nothing is passed with env.

@josegar74 josegar74 added this to the 4.4.10 milestone Feb 3, 2026
@jodygarnett
Copy link
Contributor

Thanks @ZakarFin - see also #9158 as I clean up the doc PRs.

ZakarFin and others added 2 commits February 7, 2026 23:21
Co-authored-by: Jose García <josegar74@gmail.com>
Co-authored-by: Jose García <josegar74@gmail.com>
curl -X PUT http://localhost:9200/gn-features -H 'Content-Type: application/json' -d @features.json
curl -X PUT http://localhost:9200/gn-records -H 'Content-Type: application/json' -d @records.json
curl -X PUT http://localhost:9200/gn-searchlogs -H 'Content-Type: application/json' -d @searchlogs.json
```
Copy link
Author

@ZakarFin ZakarFin Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are based on

core-geonetwork/pom.xml

Lines 1607 to 1611 in e8cee08

<es.index.features>gn-features</es.index.features>
<es.index.features.type>features</es.index.features.type>
<es.index.records>gn-records</es.index.records>
<es.index.records.type>records</es.index.records.type>
<es.index.searchlogs>gn-searchlogs</es.index.searchlogs>
and observed index names that are created to elastic using default config (behaviour without customising the config).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review required

Development

Successfully merging this pull request may close these issues.

3 participants