Details
-
Task
-
Status: Closed
-
Resolution: Done
-
None
-
None
Description
ruby
|
require 'mongoid'
|
|
class Foo
|
include Mongoid::Document
|
|
field :x
|
index(x: -1)
|
index(x: 1)
|
end
|
|
Foo.index_specifications.each do |spec|
|
p spec
|
end
|
This only yields a single index specification:
[#<Mongoid::Indexable::Specification:0x007fdb8f45c4b0 @klass=Foo, @key={:x=>-1}, @options={}>]
|
This is definitely a change from 3.x, but I wonder whether it's by design? I am not clear whether having an index in both directions actually does anything in MongoDB, so if it's not a regression it should at least be documented.