Conversation
alexgarel
commented
Jun 20, 2025
- index all the fields we want to be able to use
- update API to fetch document to last version
| for nova_group, markers in nova_groups_markers.items() | ||
| ] | ||
|
|
||
| def transform_images(self, document: JSONType): |
There was a problem hiding this comment.
A docstring summarizing the transformations would be nice.
There was a problem hiding this comment.
Maybe we should change the schema in product opener instead of here, and use a more descriptive format (e.g. as you did, using hash keys to indicate what it is instead of arrays with different meaning according to the position in the array...)
There was a problem hiding this comment.
@stephanegigandet we want to deploy quickly.
I think transforming nova_group_markers in the API is a good idea, and we can drop this code after that.
But for images, I think using image id as hash key is ok for the API (and easy to manipulate in JS), it's just that for ES we want a list of dicts, but it's more related to the way ES works. So it's ok to transform the data in this scenario.
And this leaves a question to you @raphael0202 and @stephanegigandet: should we transform data back to the hashmap style when we send back results ?
There was a problem hiding this comment.
And this leaves a question to you @raphael0202 and @stephanegigandet: should we transform data back to the hashmap style when we send back results ?
I think we should stay close to the OFF API, so I would prefer transforming it back to the format returned by Product Opener in v3.4.
raphael0202
left a comment
There was a problem hiding this comment.
A few remarks, but otherwise looks good to me!
to be able to handle them correctly (with files ES does not start
|
For information, the state of this PR is the following:
|