changeset 1369:e34b627881e4

EMAIL and OPENID fields are not unique as we store empty values there, fixes #185
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 09 Jun 2012 18:35:13 +0200
parents f369d028cb15
children cd42e6133f5f
files MoinMoin/storage/middleware/indexing.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/middleware/indexing.py	Sat Jun 09 18:23:20 2012 +0200
+++ b/MoinMoin/storage/middleware/indexing.py	Sat Jun 09 18:35:13 2012 +0200
@@ -260,8 +260,12 @@
         latest_revs_fields.update(**common_fields)
 
         userprofile_fields = {
-            EMAIL: ID(unique=True, stored=True),
-            OPENID: ID(unique=True, stored=True),
+            # Note: email / openid (if given) should be unique, but we might
+            # have lots of empty values if it is not given and thus it is NOT
+            # unique overall! Wrongly declaring it unique would lead to whoosh
+            # killing other users from index when update_document() is called!
+            EMAIL: ID(stored=True),
+            OPENID: ID(stored=True),
         }
         latest_revs_fields.update(**userprofile_fields)