GithubHelp home page GithubHelp logo

Comments (3)

nshafer avatar nshafer commented on July 24, 2024

Hi Josh,

In looking into this I am a little confused. From what I can tell, Selectize.js does its own sorting of the result set using Sifter.js, and based on scoring a match. Also, from what I can tell, Selectize is designed to do the sorting on the client side and not the server side. Just in some simple tests the cost of adding the sorting on Postgres went from .5 to 33.5, so a massive increase in the work that the database has to do. I don't have a very large dataset to test with, but after looking at how things work and in my testing I don't see a difference between default behavior and your modified function. Have you seen a difference?

from taggit-selectize.

joshkersey avatar joshkersey commented on July 24, 2024

In this particular use case it's a Django admin input for tagging. The admin users were complaining of the single word results not appearing.

The difference we've seen is that the single word tags are now appearing at the top of the result list rather than not appearing on the result list at all even with RECOMMENDATION_LIMIT: 30. On occasion the results are not in precise length order but it's made my client happy.

from taggit-selectize.

nshafer avatar nshafer commented on July 24, 2024

Hmm, there must be something in either Selectize.js or Sifter.js that is honoring the original sorting in some way or another. For now, we'll just leave it as is. There is nothing stopping you or someone else using this module from making their own view that returns the data any ways they want, but in the interest of performance for the common case, I'll leave the view as-is. Thanks for the info!

from taggit-selectize.

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.