在 Solr 索引记录中,假设我有这个示例记录(例如 JSON):
{
"title":"Innovation Life and Strategy",
"author":"Sarah Howard",
},
{
"title":"Simple Life", <--- This will be ignored
"author":"W. David",
},
{
"title":"Today's Innovations",
"author":"Michael Wayne", <--- This Author will be listed at the top
},
{
"title":"The Innovation Records",
"author":"Tommy Wright",
},
etc ..
如何进行 Solr 查询以:
innovation
在title
字段中过滤
(所以我们在那里有 3 条记录)- 然后,通过将author:放在顶部对结果进行排序
Wayne
所以最终的结果应该是:
{
"title":"Today's Innovations",
"author":"Michael Wayne",
},
{
"title":"Innovation Life and Strategy",
"author":"Sarah Howard",
},
{
"title":"The Innovation Records",
"author":"Tommy Chen",
},
我只进入第一步,fq=title:*Innovation*
但我不知道第二步的查询(自定义排序)。
请问我怎样才能得到它?