Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mappings: multiple locations with geometry fail indexing #1807

Closed
slint opened this issue Sep 2, 2024 · 0 comments · Fixed by #1825
Closed

mappings: multiple locations with geometry fail indexing #1807

slint opened this issue Sep 2, 2024 · 0 comments · Fixed by #1825

Comments

@slint
Copy link
Member

slint commented Sep 2, 2024

To reproduce, try to create a draft via the REST API with the following metadata:

data = {
    "metadata": {
        ...
        "locations": {
            "features": [
                {"geometry": {"type": "Point", "coordinates": [10.2, 5.0]}},
                {"geometry": {"type": "Point", "coordinates": [5.1, 1.23]}},
            ]
        }
    }
}

Will raise the following error from OpenSearch:

{'error': {'reason': 'DocValuesField "metadata.locations.features.geometry" '
                     'appears more than once in this document (only one value '
                     'is allowed per field)',
           'root_cause': [{'reason': 'DocValuesField '
                                     '"metadata.locations.features.geometry" '
                                     'appears more than once in this document '
                                     '(only one value is allowed per field)',
                           'type': 'illegal_argument_exception'}],
           'type': 'illegal_argument_exception'},
 'status': 400}

Seems to be related to opensearch-project/OpenSearch#10958, which in theory has been fixed, so probably needs further investigation.

slint added a commit to slint/invenio-rdm-records that referenced this issue Sep 27, 2024
* Addresses inveniosoftware#1807.
* Fixes that multiple values for ``metadata.locaations.features``.
@slint slint moved this to In review in Sprint Q4/2024 🎄 Sep 27, 2024
@slint slint linked a pull request Sep 27, 2024 that will close this issue
slint added a commit to slint/invenio-rdm-records that referenced this issue Oct 14, 2024
* Addresses inveniosoftware#1807.
* Fixes that multiple values for ``metadata.locaations.features``.
slint added a commit that referenced this issue Oct 16, 2024
* Addresses #1807.
* Fixes that multiple values for ``metadata.locaations.features``.
slint added a commit to slint/zenodo-rdm that referenced this issue Oct 16, 2024
📁 invenio-app-rdm (13.0.0b1.dev11 -> 13.0.0b1.dev12 🌈)

    📦 release: v13.0.0b1.dev12
    collections: added search in collection
    collectios: increase num_records label size
    * Sort collections by oldest first
    browse: limit size of subcommunities display
    subcommunities: added configurable label
    collections: adapt to backend changes
    browse: fix subcommunities header size
    collections: UI improvements

    * Added logos as static files
    * UI improvements in collections and communities browse pages
    collections: updated frontend to use dictionaries
    collections: added error handling
    collections: updated service read
    ui: added theme classes to record list

📁 invenio-communities (17.1.3 -> 17.2.0 🌈)

    📦 release: v17.2.0
    subcommunities: updated page layout

📁 invenio-rdm-records (15.2.0 -> 15.3.0 🌈)

    📦 release: v15.3.0
    collections: added collection id to record search

    * collections: remove query from serialization.
    collections: use dsl.Q to build queries
    collections: use ModelField from invenio-records

    * collections: make model queries lazy
    collections: improved backend

    * Added service config
    * Added links for collections
    * Added schema for collections
    * Refactored collections to_dict
    * Added depth parameter to collections API
    * Added cached_property to children property in Collection class.
    * Added tests for collections service.
    * Added tests for collections API.
    collections: added logos as static files
    collections: refactored backend
    mappings: disable doc_values for geo_shape fields

    * Addresses inveniosoftware/invenio-rdm-records#1807.
    * Fixes that multiple values for ``metadata.locaations.features``.
    services: Allow only admin to bypass feature flag
    services: Add elevated permissions check for publish and community removal
    services: Handle case for draft republish with multiple communities
    services: Override publish and remove APIs to check for new config
    Services: Communities: Add feature to require community based on config

📁 invenio-vocabularies (6.4.0 -> 6.4.1 🐛)

    📦 release: v6.4.1
    fix: exclude unknown fields when updating awards with subjects
    fix: revert generic writer and define OpenAIRE awards writer logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant