Closed Christilut closed 4 years ago
Yes, it suggests all attributes of nested objects / arrays of objects. It is OK to create an index on deep object fields within arrays. But I understand it's "too much". We need to suggest all possible options for any use-case, just not sure how to display it properly.
Not sure about your data structure here, seems truly weird in the screenshot. And what do you mean by __v
?
BTW, is beatshift... ....mp3
a field? Suggestions should only show field names.
beatshiftOffsetLocations
is a an array field, everything behind beatshiftOffsetLocations
is an item in the array
Isn't the __v
is a mongodb version field? Or maybe its a mongoose field... I always use mongoose. Either way it might be one of the common fields that's not meant for humans
Trying to find the bug with the arrays, but can't. Here's how it works: Mingo a takes a sample of 100 documents from the collection, analyzes the structures of each, combines them all together. It only takes field names and subdocument field names.
Maybe, just thinking, could you have one document with such fields by accident? Since this is done on a random sample of 100 docs, we can't tell which doc it was, but could be just one doc of all the analyzed docs.
I was hoping you found a bug, but can't find how that could be. Maybe have a look at the data (use the "Data structure" tool to see if there's an issue with your data). If not, maybe you could send me a sample document? (if it's not too private, over email).
Thanks!
Well I only have a few documents in this collection so maybe it's random bad luck.
This is what the doc in question looks like:
{
"_id": new ObjectID("5d35e53e097faa07ac0fd88a"),
"_active": true,
"roles": [
"user"
],
"cognitoUserId": "123",
"createdAt": new Date("Sun Jul 22 2018 18:33:02 GMT+0200 (Central European Summer Time)"),
"updatedAt": new Date("Fri Dec 13 2019 12:45:02 GMT+0100 (Central European Standard Time)"),
"__v": 0,
"itunesTrackIdsMarkedNotOwned": [
],
"itunesTrackIdsMarkedOwned": [
1464545601,
1471596298,
1462426786,
1349479878,
1459853854,
1472800240,
1468058704,
1474234517,
1464545850
],
"library": new ObjectID("5df379be87e731146b5fd97c"),
"beatshiftOffsetLocations": {
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/01 Megalomaniac.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/03 Leid Und Elend.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/05 Torture.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/06 Spit Sperm.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/10 Waste.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/04 Mercy.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/08 Down and Out.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/07 Anarchy.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/02 Stray Bullet.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/09 Unfit.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2 Unlimited - 1992 - No Limits! [320]/02 - 2 Unlimited - Tribal Dance.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Birdy Nam Nam - Defiant Order EP (2013) [MP3 320]/02. Defiant Order (Breakbot Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Birdy Nam Nam - Defiant Order EP (2013) [MP3 320]/01. Defiant Order.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Birdy Nam Nam - Defiant Order EP (2013) [MP3 320]/03. Defiant Order (Craze 'Get Live' Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Birdy Nam Nam - Defiant Order EP (2013) [MP3 320]/04. Defiant Order (UZ Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Birdy Nam Nam - Defiant Order EP (2013) [MP3 320]/05. Defiant Order (Block Beattaz Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Bionic Commando/Bionic Commando - Bionic Commando (Rusko Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Knowledge And Wisdom - Dj Phantasy.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Ricochet - Psycho.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Simon Bassline Smith - Hypnosis (Aphrodite Mix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - DJ Phantasy - Atmosphere (Alex Reece Mix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - DJ Creation - X-Files.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Nookie - Moments In Space.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - E-Z Rollers - Believe (Photek Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Asend And Dead Dread Remix)(Simon Bassline Smith - Zanzibar.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Optical - Cut Throat Flow.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Ricochet - Spiral Of Jazz.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - Austin M - Covert.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - DJ Creation - Dark Coast.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/Aphrodite Presents Full Force (Disc 2)/Aphrodite - System 4 - Ghetto.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/08 - Everybody In The Place (155 And Rising).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/01 - Jericho.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/02 - Music Reach (1234).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/06 - Charly (Trip Into Drum And Bass Version).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/12 - Death Of The Prodigy Dancers (Live).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/07 - Out Of Space.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/10 - Fire (Sunrise Version).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/05 - Hyperspeed (G-Force Part 2).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/09 - Weather Experience.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/03 - Wind It Up.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/01 - Your Love.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/11 - Ruff In The Jungle Bizness.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/05 - Weather Experience (Top Buzz Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/10 - Everybody In The Place (Fairground Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 1/04 - Your Love (Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/06 - Wind It Up (Rewound).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/04 - We Are The Ruffest.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/07 - G-Force (Energy Flow).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/08 - Crazy Man.mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/09 - Out Of Space (Techno Underworld Remix).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/03 - Fire (edit).mp3": "A",
"/Volumes/SSD/Users/chris/Music/Music/2001 - Experience Expanded/CD 2/02 - Ruff In The Jungle (Uplifting Vibes Remix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Christopher Just - I'm A Disco Dancer (And A Sweet Romancer) (Fatboy Slim Remix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Deeds Plus Thoughts - The World's Made Up Of This And That (Fatboy Slim Remix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/F.C. Kahuna - What Is Kahuna (Fatboy Slim's 'Smell The Kahuna' Mix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Lunatic Calm - Roll The Dice (Fatboy Slim Vocal Mix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Psychedeliasmith - Dubby Joint (Fatboy Slim Remix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Stretch 'N Vern - Get Up! Go Insane! (Fatboy Really Lost It Mix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Jean Jacques Perrey - E.V.A. (Fatboy Slim Remix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Wildchild - Renegade Master (Fatboy Slim Old Skool Mix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Mighty Dub Katz - Magic Carpet Ride (Fatboy Slim Latin Ska Acid Breakbeat Mix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/01 - Fatboy Slim - Don't Let The Man Get You Down.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/02 - Fatboy Slim - Slash Dot Dash.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/03 - Fatboy Slim - Wonderful Night.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim's Greatest Remixes/Underworld - King Of Snake (Fatboy Slim Remix).mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/05 - Fatboy Slim - Put It Back Together.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/06 - Fatboy Slim - El Bebe Masoquista.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/07 - Fatboy Slim - Push And Shove.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/09 - Fatboy Slim - The Journey.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/10 - Fatboy Slim - Jin Go Lo Ba.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/04 - Fatboy Slim - Long Way From Home.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/12 - Fatboy Slim - The Joker.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/08 - Fatboy Slim - North West Three.mp3": "A",
"/Volumes/skynet/audio/Fatboy Slim - Palookaville/11 - Fatboy Slim - Song For Chesh.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/02 Stay The Night.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/03 Carpe Diem.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/04 Let Yourself Go.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/06 Fell For You.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/07 Loss Of Control.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/09 Angel Blue.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/01 Nuclear Family.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/10 Sweet 16.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/11 Rusty James.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/12 Oh Love.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/05 Kill The Dj.mp3": "A",
"/Volumes/skynet/audio/Green Day - Uno! MP3 320/08 Troublemaker.mp3": "A",
"/Volumes/skynet/audio/100 Hits 90s Pop - CD2/Run DMC & Jason Nevins - It's Like That.mp3": "A",
"/Volumes/skynet/audio/100 Hits 90s Pop - CD2/Scatman John - Scatman (SkiBaBopBaDopBop).mp3": "A"
},
"firebaseUserId": "123",
"isBetaUser": false
}
Ok, so /Volumes/SSD/Users/chris/Music/Music/1997 - Symbols/01 Megalomaniac.mp3
is an object key, becuase beatshiftOffsetLocations
is an object, that's why it is suggesting it.
Ah yeah sorry, it's an object and not an array, my bad
Seems that every value of my arrays are suggestions. I don't think array values are good suggestions here.
And should probably filter
__v