Ellerhold / fs2es-indexer

This tool indexes your directories into an elastic search index and prepares them for searching via Mac OS Spotlight search in a samba file server.
44 stars 3 forks source link

Using OpenSearch 12 - Getting API 406 Error #39

Open vepicurean opened 8 months ago

vepicurean commented 8 months ago

Hi:

Running Debian 12 server ( no GUI ).

I set up Opensearch 12 (true open source fork of ElasticSearch) on Debian 12 server - everything on the testing for Opensearch 12 passes.

Following your GitHub install instructions exactly.

When I go to create the index in the Python3 venv I'm gettin the following error:

2024-02-23 03:34:56 Reading config file "/etc/fs2es-indexer/config.yml" 2024-02-23 03:34:56 Starting indexing run... 2024-02-23 03:34:56 - Creating index "files" ... 2024-02-23 03:34:56 Failed to create index at elasticsearch "https://localhost:9200": ApiError(406, 'Content-Type header [application/vnd.elasticsearch+json; compatible-with=8] is not supported', 'Content-Type header [application/vnd.elasticsearch+json; compatible-with=8] is not supported')

Other's have seen this API compatibility error recently as well.

If I can solve this issue/error above with fs2es-indexer, I think I should be able to get the rest so that I can search my smb shares via MacOS finder using spotlight.

This fs2es-indexer has potential. It would be good to see it become more actively used and deveoped vs the alternatives for a backend index for MacOS spotlight.

MatthiasKuehneEllerhold commented 7 months ago

Im using the elasticsearch library to access the ES instance. So this header is coming from the lib itself. Im not sure if I can override it. Do you know if there is any opensearch library for python? I could add a switch into the code to use it instead of the ES library. Seems like https://opensearch.org/docs/latest/clients/python-low-level/ is available.