在我的Django algolia设置中,我想添加具有特定排序的奴隶,例如
settings = {
'attributesToIndex': index_fields,
'slaves': ['Book_by_price_asc','Book_by_price_desc'],
}
但我似乎无法找到向奴隶添加customRanking的正确方法
'customRanking': ['asc(book)'] and 'customRanking': ['desc(book)']
。
我希望能够在python中定义它,类似于algolia rails支持。
add_slave 'Book_by_price_asc', per_environment: true do
attributesToIndex [:name, :author, :editor]
customRanking ['asc(price)']
end
这在python中是否可行?
谢谢!
答案 0 :(得分:1)
实际上,Django集成还没有。