>From you're given sample
*     DB[:table].full_text_search([:column1, :column2], ['term1','term2'])*

I have this as it's only 1 column I want to search on on this occasion.

@db[:cust_data].full_text_search([:cust_name], ['mobil']).each{|t| puts t}

from executing the above inside a method within my sequel script i don't see
any output!
the DB is MYSQL..

to prove that i have a valid connection i try a display get the server
version and that's the second line down so have an issue with the reference
to the error Can't connect to MYSQL server on localhost.


C:\monitoring screen>ruby -rubygems sequel1.rb
Server version: #<Sequel::MySQL::Dataset:0x29e8930>
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/adapters/mysql.rb:137
:in `real_connect': Mysql::Error: Can't connect to MySQL server on
'localhost' (
10061) (Sequel::DatabaseConnectionError)
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/adapters
/mysql.rb:137:in `connect'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/database
/misc.rb:45:in `initialize'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool.rb:92:in `call'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool.rb:92:in `make_new'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:126:in `make_new'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:112:in `available'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:102:in `acquire'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:146:in `sync'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:146:in `synchronize'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:146:in `sync'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:101:in `acquire'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/connecti
on_pool/threaded.rb:74:in `hold'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/database
/connecting.rb:226:in `synchronize'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/adapters
/mysql.rb:184:in `execute'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/dataset/
actions.rb:541:in `execute'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/adapters
/mysql.rb:440:in `execute'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/adapters
/mysql.rb:366:in `fetch_rows'
        from
C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.21.0/lib/sequel/dataset/
actions.rb:123:in `each'
        from sequel1.rb:256:in `get_soundex'
        from sequel1.rb:279

C:\monitoring screen>

On 22 March 2011 11:27, Jeremy Evans <[email protected]> wrote:

> On Mar 21, 2:09 pm, dave lilley <[email protected]> wrote:
> > Thanks rohit,
> >
> > I had looked through github, my rdocs from the gem but didn't think of
> > looking at the rubyforge site!!
> >
> > tonight when i get home I shall test this out.
> > Also tried searching for example usage of stored procedures within sequel
> > github and my gem structure with no luck not to mention googling.
> >
> > Question - Is what I am trying to do something not normally done?
>
> Well, not that many people using Sequel use stored procedures.  But it
> was added for a reason, and it is tested on MySQL at least, both with
> the mysql and jdbc adapters.  I've heard it works elsewhere, except
> that IN/OUT parameters aren't necessarily handled.
>
> > if this is the case what would be considered mainstream?
> > also is there any examples of usage for the full_text_search?
>
> If your dataset supports it (e.g. for MSSQL, Postgres, and MySQL):
>
>  DB[:table].full_text_search([:column1, :column2], ['term1',
> 'term2'])
>
> > I refer to this url -
> http://sequel.rubyforge.org/rdoc-adapters/index.html
> > I am only too happy to do something as a worked example and post to this
> > forum or github.
>
> More examples would certainly help.  Full text search using Sequel
> certainly isn't explained in detail anywhere, and I'd be happy to
> include more documentation about it.
>
> Thanks,
>  Jeremy
>
> --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sequel-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to