pedalpete
pedalpete

Reputation: 21536

Texticle in rails isn't providing the responses I want. How configurable is it? or have I got it wrong?

I'm using the texticle gem in a Rails 3 app.

I've got a table full of food names, such as Onion, Green Onion, Onion Powder, etc. etc.

I'm searching the table with

    foodnames = FoodName.search(params[:search])
        return render :json => foodnames

when I attempt to search for 'chopped onion', I had hoped to get back a list of matching 'onion', as those are somewhat close, but I'm getting an empty set.

If I use just 'Onion' or 'Onions', I get back the list I expected.

there seem to be conflicting documentation with texticle. the github repository page, https://github.com/texticle/texticle shows methods like fuzzy_search, but when I try to run that I get undefined methodfuzzy_search' for #Class`

the other documentation http://texticle.github.com/texticle/ says nothing about fuzzy_search or similar capabilities.

my gem file has gem 'texticle', '~> 2.0', require: 'texticle/rails', though I did add that in and re-bundle install after I original had it without the version or require statements.

can anybody clarify what is going on here, and how I can get a better search result? It seems far too strict for my needs as is, and I suspect things are not working as they are supposed to.

Upvotes: 1

Views: 208

Answers (0)

Related Questions