Comments (3)
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.
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.
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)
- Items should split if not in quotes HOT 3
- with DRF HOT 1
- taggit-selectize in templates HOT 14
- Does this only work in admin ? HOT 10
- Safari form submission broken HOT 1
- Update selectize.js to latest version HOT 2
- Is the Example App Compatible with Django 2.1.5? HOT 1
- Incompatible with django-taggit 1.0
- ModuleNotFoundError: No module named 'taggit-selectize' HOT 2
- Django 3.0 support HOT 2
- put jQuery in top of base_site.html
- Uncaught TypeError: $(...).selectize is not a function
- Make taggit-selectize responsive and add a new tag with comma (on mobile)
- Using taggit-selectize with django 3
- close_after_select config value
- RemovedInDjango40Warning: force_text() is deprecated in favor of force_str(). HOT 1
- RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path() HOT 1
- Theming support
- Example app does not contain sample template
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taggit-selectize.