Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Mapping not updated when field is changed #48

Open
leplatrem opened this issue Jun 13, 2017 · 0 comments
Open

Mapping not updated when field is changed #48

leplatrem opened this issue Jun 13, 2017 · 0 comments
Labels
bug stale For marking issues as stale. Labeled issues will be closed soon if label is not removed.

Comments

@leplatrem
Copy link
Contributor

leplatrem commented Jun 13, 2017

Mapping field types can't be changed apparently.

WARNI  PUT http://localhost:9200/kinto-build-hub-releases/_mapping/kinto-build-hub-releases [status:400 request:0.079s]
ERROR  Unable to notify
Traceback (most recent call last):
  File "/home/mathieu/Code/Mozilla/kinto/kinto/core/events.py", line 89, in _notify_resource_events_after
    request.registry.notify(event)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/pyramid/registry.py", line 110, in notify
    [ _ for _ in self.subscribers(events, None) ]
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/zope/interface/registry.py", line 424, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/zope/interface/adapter.py", line 607, in subscribers
    subscription(*objects)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/pyramid/config/adapters.py", line 130, in subscriber_wrapper
    return derived_subscriber(*arg)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/pyramid/config/adapters.py", line 103, in derived_subscriber
    return subscriber(arg[0])
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/kinto_elasticsearch/listener.py", line 30, in on_collection_updated
    indexer.update_index(bucket_id, collection_id, schema=new_schema)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/kinto_elasticsearch/indexer.py", line 39, in update_index
    body=schema)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/elasticsearch/client/utils.py", line 73, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/elasticsearch/client/indices.py", line 282, in put_mapping
    '_mapping', doc_type), params=params, body=body)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/elasticsearch/transport.py", line 312, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 128, in perform_request
    self._raise_error(response.status, raw_data)
  File "/home/mathieu/Code/Mozilla/kinto-elasticsearch/.venv/lib/python3.5/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, 'illegal_argument_exception', 'mapper [download.url] of different type, current_type [keyword], merged_type [text]')
@leplatrem leplatrem added the bug label Jun 13, 2017
@leplatrem leplatrem changed the title Mapping apparently not updated on collection metadata PATCH Mapping not updated when field is changed Jun 13, 2017
@alexcottner alexcottner added the stale For marking issues as stale. Labeled issues will be closed soon if label is not removed. label Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug stale For marking issues as stale. Labeled issues will be closed soon if label is not removed.
Projects
None yet
Development

No branches or pull requests

2 participants