geohub
geohub copied to clipboard
Search doesn't work in self-hosted instances
The search implementation uses a feature that is for the Atlas version of mongodb, which is not present in the mongo docker container.
geohub-dev-1 | error - MongoServerError: Using $search and $vectorSearch aggregation stages requires additional configuration. Please connect to Atlas or an AtlasCLI local deployment to enable.For more information on how to connect, see https://dochub.mongodb.org/core/atlas-cli-deploy-local-reqs.
geohub-dev-1 | at MessageStream.messageHandler (/usr/src/app/node_modules/mongodb/lib/cmap/connection.js:467:30)
geohub-dev-1 | at MessageStream.emit (events.js:400:28)
geohub-dev-1 | at processIncomingData (/usr/src/app/node_modules/mongodb/lib/cmap/message_stream.js:108:16)
geohub-dev-1 | at MessageStream._write (/usr/src/app/node_modules/mongodb/lib/cmap/message_stream.js:28:9)
geohub-dev-1 | at writeOrBuffer (internal/streams/writable.js:358:12)
geohub-dev-1 | at MessageStream.Writable.write (internal/streams/writable.js:303:10)
geohub-dev-1 | at Socket.ondata (internal/streams/readable.js:731:22)
geohub-dev-1 | at Socket.emit (events.js:400:28)
geohub-dev-1 | at addChunk (internal/streams/readable.js:293:12)
geohub-dev-1 | at readableAddChunk (internal/streams/readable.js:267:9) {
geohub-dev-1 | ok: 0,
geohub-dev-1 | code: 31082,
geohub-dev-1 | codeName: 'SearchNotEnabled',
geohub-dev-1 | page: '/api/search'
geohub-dev-1 | }
Using mongodb/mongodb-atlas-local as a drop-in replacement doesn't work. Likely with some tweaking it could however.