From 22313f9e5a40df8770d5b70b479e4b079de7b34a Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 19 Sep 2018 00:08:00 +0000 Subject: [PATCH] --- devdocs/todo.txt | 9 +++++++-- server/AyaNova/biz/Search.cs | 33 ++++----------------------------- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 2f48b391..0a8a93e7 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -30,10 +30,15 @@ IMMEDIATE ITEMS: - Search and search text indexing - - Add to widget tests + - Finish coding processkeywords in Search.cs + - Add tests using widget which now sports a Notes property + - Add code to do actual search and return results and routes (tags need support too as per search specs) + - Add tests for searching and routes + + - Auto visible id number assigning code - Give widgets a visible ID number scheme and add to tests - + - Ensure search code process keywords includes the Visible ID value andadd test for that in Search indexing tests diff --git a/server/AyaNova/biz/Search.cs b/server/AyaNova/biz/Search.cs index 9e1945b6..b32b0bb9 100644 --- a/server/AyaNova/biz/Search.cs +++ b/server/AyaNova/biz/Search.cs @@ -45,35 +45,10 @@ namespace AyaNova.Biz private static void ProcessKeywords(AyContext ct, long localeId, long objectID, AyaType objectType, bool newRecord, string name, params string[] text) { - - //Get CJK index bool flag. - //TODO: should this be a property of the locale or a global setting as before?? - //if it's a locale property, it could be stored as just another word in the locale dictionary rather than getting into other aspects or maybe it belongs as a bool value on the - //locale record itself? - - - - - - - - - - // //get a db and logger - // ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("PrimeData"); - // User u = new User(); - // u.Active=true; - // u.Name = "AyaNova Administrator"; - // u.Salt = Hasher.GenerateSalt(); - // u.Login = "manager"; - // u.Password = Hasher.hash(u.Salt, "l3tm3in"); - // u.Roles = AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull; - // u.OwnerId = 1; - // u.LocaleId=ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID;//Ensure primeLocales is called first - // u.UserType=UserType.Administrator; - // u.UserOptions=new UserOptions(1); - // ct.User.Add(u); - // ct.SaveChanges(); + //TODO: Code this, using method idea from v7 code and adding the handling of the new InName flag and Name separately. + //Note that as initially coded in widget test class the context will be saved by the controller as it is also done with the event log + //So theoretically I don't save here, but it may turn out that the code requires a save so in that case need to re-do the WidgetController calls to here to + //account for the save } #endregion