title: Sphinx Daemon returned error: query error: no field
body: <p>If Set up Thinking Sphinx on my application now</p>
  
  <p>Everything was working fine</p>
  
  <p>Until I decide to do a conditions query with Thinking Sphinx</p>
  
  <pre><code>PartPriceRecord.search "50002" ,:conditions =&gt; { :supplier_id =&gt;
  "supp50002" },:star =&gt; true
  </code></pre>
  
  <p>and it reported me with the above error</p>
  
  <pre><code>ThinkingSphinx::SphinxError: index part_price_record_core: query
  error: no field 'supplier_id' found in schema
  </code></pre>
  
  <p>seeing even the Ryan Bates <a href="http://railscasts.com/episodes/120-thinking-sphinx" rel="nofollow">Screencast</a> 
  he seem to achieve the conditions clauses with "<strong>has</strong>" method defined
  for the column</p>
  
  <p>something like</p>
  
  <pre><code> has :author_id
  </code></pre>
  
  <p>Reading to one of the <a href="https://groups.google.com/group/thinking-sphinx/browse_thread/thread/1dad41c934bfae41/bfe498c6266102b1?lnk=gst&amp;q=%20query%20error%3a%20no%20field%20#bfe498c6266102b1" rel="nofollow">post</a> by Pate Allen (<strong>scroll down to bottom</strong>)</p>
  
  <pre><code> :with should be used for attribute filters, and :conditions for
  field queries. 
  </code></pre>
  
  <p>so changing my above code <strong>with</strong> clause</p>
  
  <pre><code>PartPriceRecord.search "PartNumber50002",:with =&gt; {:supplier_id =&gt;
  "supp50002" },:star =&gt; true
  </code></pre>
  
  <p>and  I get no result which is wrong as I can <strong>see a record for
  "supplier_id" for part_number "PartNumber50002" in by database</strong></p>
  
  <p>Now I'm confuse</p>
  
  <p>why is above error appearing and also what the fundamental difference
  between "<strong>fields</strong>" and "<strong>attribute</strong>"</p>
  
  <p>can anyone help</p>
  
  <p>BTW here my indexes definition</p>
  
  <pre><code> define_index  do
     indexes part_number
     has supplier_id
   end
  
   sphinx_scope(:supplier) { |name|
     {:conditions =&gt; {:supplier_id =&gt; supplier}}
   }
  </code></pre>