You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mongoid slug creates an index on the _slug field, not the slug.en field. Indices should at least be created on the slug I18n.default_locale field. Also, is there way way to override the default index created?
The text was updated successfully, but these errors were encountered:
Different issue from #184.
I'm trying to figure the best approach for this since there is no way to tell what locales clients support when localize is specified. Either we allow clients specify the locales they support so indices are created accordingly? Or have an option to disable index creation and let clients specify their indices based on recommendations. Both options may work as well.
For option 1, I'm thinking something along the lines of:
localize: true: This creates an index on _slug.<I18n.default_locale> field
localize: [:en, :de, :es,...]: Creates indices the specified locales.
I think we should be able to disable index creation or override what kind of index is being created here, would take a PR for that, opened #244 to track.
I think your locale suggestions make total sense, same deal.
mongoid-slug: 5.3
I have a model
Event
with the following slug specification:Getting several unoptimized queries (2-6 secs) due to full on COLLSCAN's in my Mongo logs during slug generation. A few examples below:
Mongoid slug creates an index on the
_slug
field, not theslug.en
field. Indices should at least be created on the slugI18n.default_locale
field. Also, is there way way to override the default index created?The text was updated successfully, but these errors were encountered: