title: Sphinx RT Index and SphinxQL Query
body: <p>We are deploying the RT index in our architecture. But we need some clarification and some difficulties faced during the deployment.</p>
  
  <p>Schema defined in Index:</p>
  
  <pre><code>        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
          }
  </code></pre>
  
  <p>Faced Problem</p>
  
  <p>Question 1:
          How we can get the count() query result in SPHINXQL. Because its important for us, based on customer count we have to take it to show in our application. </p>
  
  <p>Example below,</p>
  
  <pre><code>Query - select count(*) from logtable where CustomerId='871';   
  </code></pre>
  
  <p>In SphinxQL - We didnt get this result and getting the following error.ERROR 1064 (42000): index logtable: invalid schema: Count(*) or @count is queried, but not available in the schema.</p>
  
  <p>Question 2:
          i declared as a STRING attribute in conf for the field of "TransactionId", but i cant able to retrieve the records if that fields use in where condition. </p>
  
  <pre><code>    Example below, 
  
      select * from logtable where TransactionId='TRA23454'; 
  </code></pre>
  
  <p>Following error i am getting, 
              ERROR 1064 (42000): sphinxql: syntax error, unexpected $undefined, expecting CONST_INT or CONST_FLOAT or '-' near '"TRA23454"'</p>
  
  <p>Please help us to close these issues if knows.</p>
  
  <p>Kumaran</p>