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
SOLR-3, SOLR-66: Bring event to current search parity #45
Conversation
sir/wscompat/convert.py
Outdated
:type obj: :class:`mbdata.models.LinkAreaEvent` | ||
""" | ||
relation = models.relation(direction="backward", | ||
type_=obj.link.link_type.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this also output type_id
? I also wonder why convert_area_relation
above doesn't output attributes, but this does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont see a type_id anywhere in the current search results - https://musicbrainz.org/ws/2/event?query=area:Berlin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I can see it has been added in ws results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly the area-area rels do not have an attribute list in the current code https://github.com/metabrainz/search-server/blob/master/index/src/main/java/org/musicbrainz/search/index/AreaIndex.java#L232
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there are tickets for that, but it should be made to match the standard WS results. Relationships should be serialized in the same way everywhere, other than the target entity -- I think it'd make sense to only have one method for serializing all relationships that accepts a callback to add in the target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it uniform.
No description provided.