Reusing Thinking Sphinx SQL connection to utilize CALL KEYWORDS

8 views
Skip to first unread message

jason...@me.com

unread,
Dec 6, 2021, 8:15:44 PM12/6/21
to Thinking Sphinx
I'm trying to add autocomplete to a keyword search field. I'm using Manticore 4.0.2, and wish to use the CALL KEYWORDS syntax to get normalized keywords from the index, which is built with min_prefix_len=2 and index_exact_words=1.

How can I use Thinking Sphinx's current mysql connection to fetch this result set?

Pat Allan

unread,
Dec 7, 2021, 5:36:05 AM12/7/21
to thinkin...@googlegroups.com
That’s a good question! Something like the following should do the trick:

    ThinkingSphinx::Connection.take do |connection|
      connection.execute “CALL KEYWORDS(‘word*’, ‘model_core’)"
    end

Do let me know if there’s further questions.

Cheers,

— 
Pat

On 7 Dec 2021, at 4:37 am, 'jason...@me.com' via Thinking Sphinx <thinkin...@googlegroups.com> wrote:

I'm trying to add autocomplete to a keyword search field. I'm using Manticore 4.0.2, and wish to use the CALL KEYWORDS syntax to get normalized keywords from the index, which is built with min_prefix_len=2 and index_exact_words=1.

How can I use Thinking Sphinx's current mysql connection to fetch this result set?

--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thinking-sphinx/add483ea-4431-4111-8a17-e8c1f7a8ca88n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages