Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/44/d147545640/htdocs/david-scherrer/perso/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
mongodb « mon "Blog Note" partagé :-)

Articles contenant le tag mongodb

MongoDB

Voir la doc… hahaha… Quelques requêtes ci-dessous…

Requête pour trouver des doublons sur un index et nettoyer la donnée avant contrainte d’unicité.

Le principe est

  1. de remonter les objets avec un élément les caractérisant (type?) et de les grouper par identifiant + compter le nombre d’occurences.
  2. de garder les identifiants qui sont trouvés plus d’une fois
  3. regrouper par nombre d’occurences les identifiants
[{ $group: { _id: "$idOuvrage", niveau: { $first: "$niveau" }, count: { $sum: 1 } } }, { $match: { count: { $gt: 1 } } }, { $group: { _id: "$count", niveau: { $first: "$niveau" }, ids: { $push: "$_id" } } }]

,

Pas de commentaire