zoukankan      html  css  js  c++  java
  • sphinx中,直接取主键ID

    sphinx.conf中 

    sql_query    = \
      SELECT aid,aid AS testid, title,group_id \
      FROM documents

    aid为主键ID,

    必须AS成testid后,

    再添加一个属性,sql_attr_uint   = testid

    才可以显示成如下形式:

      [matches] => Array
            (
                [1] => Array
                    (
                        [weight] => 1
                        [attrs] => Array
                            (
                                [testid] => 1                  ------------>显示出来了,这个问题搞了一下午,气人
                                [group_id] => 1
                            )

                    )

            )

  • 相关阅读:
    洛谷P1357 Solution
    洛谷P3469 Solution
    洛谷P2617 Solution
    CF818F Solution
    CF802K Solution
    CF519E Solution
    在代码中改变log的级别
    Java非对称加密解密
    mvn test 远程调试
    rsyn实现服务器源码同步
  • 原文地址:https://www.cnblogs.com/flex_fly/p/1759514.html
Copyright © 2011-2022 走看看