Is it possible to persist a joined field in Djangos SearchVectorField?
问题 Is it possible to persist a joined field with Djangos SearchVectorField for full text search? For example: class P(models.Model): brand = models.ForeignKey(Brand, on_delete=models.CASCADE) search_vector = SearchVectorField(null=True, blank=True) code: p = P.objects.get(id=1) p.search_vector = SearchVector('brand__name') p.save() raises this exception: FieldError: Joined field references are not permitted in this query If this is not possible how can you increase the performance of joined