zoukankan      html  css  js  c++  java
  • 处理Sphinx(Coreseek)Query failed: index xxxx: sort-by attribute 'xxxx' not found

    Sphinx在使用的时候报错Query failed: index xxxx: sort-by attribute 'xxxx' not found。第一个xxxx是索引的名称,第二个xxxx是字段的名称。

    出现这个问题的原因是:在索引中没有查找到要排序检索的字段。

    但是奇怪的是明明在创建索引文件的时候添加了这个字段,经过排查之后发现排序和检索用的是同一个字段,会起冲突。

    解决方法:

    在配置文件中给该字段添加一个别名:举个例子create_time字段

    sql_query = SELECT note_id,title,types,status,create_time,create_time as sort_time,FROM notes where (status=200 or status = 800)

    ok,搞定!

  • 相关阅读:
    配置hbase
    hive配置
    scala及spark配置
    Eclipse 配置hadoop
    腾讯云部署hadoop
    助教总结
    预习非数值数据的编码方式
    预习原码补码
    学习java的第六周
    作业一总结
  • 原文地址:https://www.cnblogs.com/yuanwanli/p/12907782.html
Copyright © 2011-2022 走看看