tag:support.flying-sphinx.com,2011-01-05:/discussions/problems/38746-search-returns-no-results-for-specific-key-wordFlying Sphinx: Discussion 2018-10-01T21:15:16Ztag:support.flying-sphinx.com,2011-01-05:Comment/461454472018-09-25T10:58:39Z2018-09-25T10:58:39ZSearch returns no results for specific key word<div><p>Hmm, I'm not spotting anything obviously wrong - it certainly sounds like the behaviour you're hoping for should work!</p>
<p>In that search call, what are the values of <code>classes</code>, <code>@without</code>, and <code>CAST_CONFIG["episode_search"]["field_weights"]</code>?</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/461454472018-09-25T11:13:42Z2018-09-25T11:13:42ZSearch returns no results for specific key word<div><p>The values are<br>
classes = [Episode,Course,Material, Program], these are active records<br>
@without - these are the ids of the not published object. An yes, Camel is a published object. There is a field in the records called published_at<br>
that I compare with current date and the unpublished and not shown<br>
CAST_CONFIG["episode_search"]["field_weights"] is:<br>
episode_search:<br>
field_weights: position: 50 name: 20 categories_names: 20 description: 15 long_description: 15 tag_names: 15 subtitles_html_content: 5 materials: 5</p>
<p>Best Regards,<br>
Kiril</p></div>Kiril Mitovtag:support.flying-sphinx.com,2011-01-05:Comment/461454472018-09-25T14:32:26Z2018-09-25T14:32:26ZSearch returns no results for specific key word<div><p>The record's definitely there in Sphinx. I'm not yet sure why it's not appearing though… I would recommend you debug by starting with a basic search in your Rails console and then add in each of the options one by one to see how that influences results. For example:</p>
<pre>
<code>Material.search "Camel"
# then
ThinkingSphinx.search "Camel",
:classes => [Episode, Course, Material, Program]
# then
ThinkingSphinx.search "Camel",
:classes => [Episode, Course, Material, Program]
:sql => {include: [:translations, :content_pictures]}</code>
</pre></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/461454472018-10-01T06:21:44Z2018-10-01T06:21:44ZSearch returns no results for specific key word<div><p>I did this. Nothing. It returns an empty result.</p>
<p>What else could I do?</p>
<p>Best Regards,<br>
Kiril</p></div>Kiril Mitovtag:support.flying-sphinx.com,2011-01-05:Comment/461454472018-10-01T21:15:16Z2018-10-01T21:15:16ZSearch returns no results for specific key word<div><p>Does the simplest version of that (<code>Material.search "Camel"</code>) not work for you? I'm seeing the record in Sphinx, so I'm rather surprised if it doesn't get returned!</p>
<p>I am presuming it's the app named <code>fllcasts</code> - is this correct?</p></div>Pat Allan