How can I add a sql_query_pre statement in the index definition in the model?

32 views
Skip to first unread message

Benjamin Moses Lieb

unread,
Oct 21, 2012, 11:30:28 AM10/21/12
to thinkin...@googlegroups.com
One of my indexes always requires that I edit the config file and add this line:

sql_query_pre = SET SQL_BIG_SELECTS = 1



I'm using capistrano for deployment, and that always wipes out the config file.  Is there a way to add this from the model instead? Because as things are, I cannot reindex programmatically, because I always have to add that line. 

Declan Frye

unread,
Oct 21, 2012, 11:34:13 AM10/21/12
to thinkin...@googlegroups.com

Can you use rake ts:rebuild instead of rake ts:index?  That should leave the config file untouched.

--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/j34W7ylCZzAJ.
To post to this group, send email to thinkin...@googlegroups.com.
To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.

Pat Allan

unread,
Oct 21, 2012, 8:19:15 PM10/21/12
to thinkin...@googlegroups.com
Not quite. ts:rebuild is a shortcut for 'ts:stop ts:index ts:start' - you're thinking of ts:reindex (which just indexes without regenerating the configuration file).

I'm afraid there's no simple way to add an additional sql_query_pre setting via code though. Not at this point, at least.

--
Pat

Reply all
Reply to author
Forward
0 new messages