Skip to content

Commit

Permalink
Parent id indexen
Browse files Browse the repository at this point in the history
  • Loading branch information
viggo-devries committed Nov 1, 2024
1 parent 0e06fe9 commit f8dd70c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions oscar_elasticsearch/search/mappings/products/mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,8 @@ def suggest(self, *args):
)
def title(self, title):
return title, title, title

@odin.assign_field
def parent_id(self):
if self.source.parent:
return self.source.parent.id

0 comments on commit f8dd70c

Please sign in to comment.