Skip to content

Commit

Permalink
And covering the :populate option on the searching page as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed Jan 3, 2011
1 parent d3be588 commit 6485170
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ts/en/searching.textile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -433,3 +433,11 @@ Thinking Sphinx also accepts the following advanced Sphinx arguments:
* "@:max_query_time@":http://www.sphinxsearch.com/docs/current.html#api-func-setmaxquerytime * "@:max_query_time@":http://www.sphinxsearch.com/docs/current.html#api-func-setmaxquerytime


Additionally, Thinking Sphinx accepts @:comment@, as the search's comment (which is printed in the query log), and @:sql_order@, which is passed through to the SQL query to instantiate the ActiveRecord objects. The latter might be useful if Sphinx's data isn't quite accurate for sorting (as can be the case with ordinal attributes). Additionally, Thinking Sphinx accepts @:comment@, as the search's comment (which is printed in the query log), and @:sql_order@, which is passed through to the SQL query to instantiate the ActiveRecord objects. The latter might be useful if Sphinx's data isn't quite accurate for sorting (as can be the case with ordinal attributes).

One other option - to avoid lazily loading search results and make sure Thinking Sphinx processes the search query immediately, is the @:populate@ option:

{% highlight ruby %}
Article.search 'pancakes', :populate => true
{% endhighlight %}

This is particularly useful to ensure exceptions are raised where you expect them to.

0 comments on commit 6485170

Please sign in to comment.