擅长:python、mysql、java
<p>只是不要将<code>indexes.Indexable</code>作为您不希望索引的任何内容的父级。在</p>
<p>所以修改你的第一个例子。在</p>
<pre><code>class BaseIndex(indexes.SearchIndex):
text = indexes.CharField(document=True, use_template=True)
object_id = indexes.IntegerField()
timestamp = indexes.DateTimeField()
class Meta:
abstract = True
class PersonIndex(BaseIndex, indexes.Indexable):
...other fields...
</code></pre>