Giter VIP home page Giter VIP logo

Comments (7)

ankane avatar ankane commented on August 15, 2024

Can you explain more about what you use it for?

The goal of Searchkick is to abstract the Elasticsearch API, whereas Tire mirrors it.

from searchkick.

mehulkar avatar mehulkar commented on August 15, 2024

Basically, we have to be able to do 3 character searches. Example: I made a sample app with Books and Authors. The title of one book was Huckleberry Finn. When I do Book.search('Fin') I get 0 matches. But when I do Book.search('Finn'), I get one match.

In the tire readme, I see that I can adjust the ngram settings. I'm not entirely sure if this is relevant to the length of my search query though?

    class URL < ActiveRecord::Base
      include Tire::Model::Search
      include Tire::Model::Callbacks

      settings :number_of_shards => 1,
               :number_of_replicas => 1,
               :analysis => {
                 :filter => {
                   :url_ngram  => {
                     "type"     => "nGram",
                     "max_gram" => 5,
                     "min_gram" => 3 }
                 }
               } do
      end
    end

from searchkick.

ankane avatar ankane commented on August 15, 2024

Searchkick should match any queries with an edit distance of one. In this case, the word is short, so it's not working as intended. I'll see what I can do to address this.

from searchkick.

ankane avatar ankane commented on August 15, 2024

Master should now match "fin" => "Finn" and all other situations where edit distance = 1. a73fbe4 This is different from partial word matching, which also needs addressed.

from searchkick.

recyclerobot avatar recyclerobot commented on August 15, 2024

Would it be possible to be able to set the distance to a larger number so I'm able to match words like "AAABBB" and "AAABCC" (2 or more?)

from searchkick.

ankane avatar ankane commented on August 15, 2024

You can now! 8463094

from searchkick.

recyclerobot avatar recyclerobot commented on August 15, 2024

wow thanks alot!! 👍

from searchkick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.