Sphinx RT and SphinxQL Query Index

We are deploying the RT index in our architecture. But we need some clarification and some difficulties encountered during deployment.

The schema defined in the index:

        index logtable
        {
        type = rt
        path = /usr/local/sphinx20/var/data/logtable
        rt_attr_string = TransactionId
            rt_attr_uint = CustomerId
        rt_attr_timestamp = DateOfTransaction
        rt_attr_string = CustomerFeedback
        rt_field = TransactionType
        }

Collision problem

Question 1: How can we get the result of the count () query in SPHINXQL. Since it is important for us, based on the number of customers, we must accept it for display in our application.

Example below

Query - select count(*) from logtable where CustomerId='871';   

In SphinxQL - we did not get this result and received the following error .ERROR 1064 (42000): index table: invalid schema: counting (*) or @count is requested, but not available in the schema.

Question 2: I am declared as a STRING attribute in the "TransactionId" field, but I can not get records if these fields are used when this condition is met.

    Example below, 

    select * from logtable where TransactionId='TRA23454'; 

,           ERROR 1064 (42000): sphinxql: , $ undefined, CONST_INT CONST_FLOAT '-' "TRA23454" '

, , .

+3
2
select * from logtable where TransactionId='TRA23454';

:

select * from logtable where  MATCH('@TransactionId TRA23454')
+2

count (*) 'show meta;' , total_count.

select id from logtable where CustomerId='871';   
show meta;

WHERE, ORDER GROUP. TransactionId integer . crc32 mysql.

+2

All Articles