Hash in Coreseek configuration bigint_php tutorial

Source: Internet
Author: User
Tags yii
[PHP]
304 $sphinxapi->setselect (' id, Domain_hash ');
304 $sphinxapi->setconnecttimeout (3);
305 $sphinxapi->setgroupby (' Domain_hash ', sph_groupby_attr, ' @count desc ');
304 foreach ($result [' matches '] as $k = $v)
321 {
322 $IDARRAY [$v [' attrs '] [' domain_hash ']] = $v [' attrs '] [' @count '];
323 $total + = $v [' attrs '] [' @count '];
324}
$sql = "Select site_name from * * WHERE Domain_hash in (". Join (', ', Array_keys ($IDARRAY)). ") Order by Find_in_set (Domain_hash, ' ". Join (', ', Array_keys ($IDARRAY)).";
331 $rawDataAll = Yii::app ()->db->createcommand ($sql)->queryall ();

304 $sphinxapi->setselect (' id, Domain_hash ');
304 $sphinxapi->setconnecttimeout (3);
305 $sphinxapi->setgroupby (' Domain_hash ', sph_groupby_attr, ' @count desc ');
304 foreach ($result [' matches '] as $k = $v)
321 {
322 $IDARRAY [$v [' attrs '] [' domain_hash ']] = $v [' attrs '] [' @count '];
323 $total + = $v [' attrs '] [' @count '];
324}
$sql = "Select site_name from * * WHERE Domain_hash in (". Join (', ', Array_keys ($IDARRAY)). ") Order by Find_in_set (Domain_hash, ' ". Join (', ', Array_keys ($IDARRAY)).";
331 $rawDataAll = Yii::app ()->db->createcommand ($sql)->queryall ();


The general hash is 12024309506718423877, 64 bits, the int type is unable to satisfy the request,
[$v [' attrs '] [' domain_hash '] are actually truncated lossy data ...
Sql_attr_unit = Domain_hash

11.1.17. Sql_attr_uint: Integer attribute
Declares an unsigned integer attribute (attribute). You can declare multiple properties of the same type with different names, which can be optional. Available only for SQL data sources (MySQL, Pgsql, MSSQL).

The value of the declared column must be within the range represented by the 32-bit unsigned integer. Values outside this range will also be accepted, but will overflow. For example, 1 will become 2^32-1 or 4,294,967,295.

You can append ": Bitcount" to the property name (see the following example) to specify the number of bits for an integer property. The property is less than the default 32-bit, which is called a bit field, which can compromise performance. However, they can save memory in external storage (extern storage) mode: These bit fields are grouped into 32-bit blocks stored in the. Spa properties data file. If inline storage (inline storage) is used, the bit-width setting is ignored.

You need to have the hash field bigint type in the Conf configuration

Sql_attr_bigint = Domain_hash
11.1.19. Sql_attr_bigint: Long-integer properties
A 64-bit integer attribute (attribute) declaration. Multiple values (multiple properties can be declared at the same time), optional options. Available only for SQL data sources (MySQL, Pgsql, MSSQL). Note that, unlike Sql_attr_uint, these values are signed. Introduced in version 0.9.9-rc1.


http://www.bkjia.com/PHPjc/477256.html www.bkjia.com true http://www.bkjia.com/PHPjc/477256.html techarticle [PHP] 304 $SPHINXAPI-setselect (ID, domain_hash); 304 $sphinxapi-setconnecttimeout (3); 305 $sphinxapi-setgroupby ( Domain_hash, sph_groupby_attr, @count desc); 304 foreach ($result [Mat ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.