This commit is contained in:
2020-01-24 16:15:26 +00:00
parent 0d01532e35
commit b1343db116
4 changed files with 24 additions and 13 deletions

View File

@@ -449,7 +449,7 @@ namespace AyaNova
{
AyaNova.Core.License.Fetch(apiServerState, dbContext, _newLog);
//NOTE: For unit testing make sure the time zone in util is set to the same figure as here to ensure list filter by date tests will work because server is on same page as user in terms of time
Util.Seeder.SeedDatabase(Util.Seeder.SeedLevel.MediumLocalServiceCompanyTrialDataSet, -7);//.Wait();//#############################################################################################
Util.Seeder.SeedDatabase(Util.Seeder.SeedLevel.MediumLocalServiceCompanyTrialDataSet, -7);//#############################################################################################
}
//TESTING
#endif

View File

@@ -463,7 +463,6 @@ namespace AyaNova.Biz
private static void ProcessKeywords(SearchIndexProcessObjectParameters p, bool newRecord)//long localeId, long objectID, AyaType objectType, string name, params string[] text)
{
//AyContext ct = ServiceProviderProvider.DBContext;
#if (DEBUG)
if (p.ObjectType == AyaType.JobOperations || p.ObjectType == AyaType.Locale)
{
@@ -483,13 +482,7 @@ namespace AyaNova.Biz
//BREAK NAME STRING
List<string> NameKeyWordList = Break(p.LocaleId, p.Name);
//BUILD ALL KEYWORDS LIST
// List<string> tempList = new List<string>();
// tempList.AddRange(KeyWordList);
// tempList.AddRange(p.Tags);
// var DistinctAllKeywordsCombinedList = tempList.Distinct();
// AllKeyWordsCombinedList=((IEnumerable<string>)AllKeyWordsCombinedList).Distinct();
//EARLY EXIT IF NO KEYWORDS OR NAME RECORD OR TAGS TO PROCESS
if (KeyWordList.Count == 0 && string.IsNullOrWhiteSpace(p.Name))
@@ -503,7 +496,7 @@ namespace AyaNova.Biz
//ITERATE ALL THE KEYWORDS, SEARCH IN THE SEARCHDICTIONARY TABLE AND COLLECT ID'S OF ANY PRE-EXISTING IN DB KEYWORDS
var ExistingKeywordMatches = ServiceProviderProvider.DBContext.SearchDictionary.AsNoTracking().Where(m => KeyWordList.Contains(m.Word)).ToDictionary(m => m.Id, m => m.Word);
//var ExistingKeywordMatches = ServiceProviderProvider.DBContext.SearchDictionary.AsNoTracking().Where(m => DistinctAllKeywordsCombinedList.Contains(m.Word)).ToDictionary(m => m.Id, m => m.Word);
//Put the matching keyword ID's into the list
foreach (KeyValuePair<long, string> K in ExistingKeywordMatches)
{
@@ -562,8 +555,7 @@ namespace AyaNova.Biz
throw ex;
}
//FETCH THE WORD ID, PLACE IN MATCHINGKEYWORDLIST AND MOVE ON TO THE NEXT WORD
//LOOKAT: 2018-10-10 15:34:34.0587|ERROR|Server Exception|Error=>System.InvalidOperationException: Sequence contains no elements
//FETCH THE WORD ID, PLACE IN MATCHINGKEYWORDLIST AND MOVE ON TO THE NEXT WORD
var SearchDictionaryMatchFoundInDB = ServiceProviderProvider.DBContext.SearchDictionary.AsNoTracking().Where(x => x.Word == KeyWord).FirstOrDefault();
if (SearchDictionaryMatchFoundInDB != null)
{

View File

@@ -615,7 +615,7 @@ namespace AyaNova.Util
var c3 = f.Random.Int(1, 99999999);
var c4 = f.Random.Bool().ToString().ToLowerInvariant();
var c5 = f.Random.Decimal();
//2019-05-01T21:38:07Z
o.CustomFields = $@"{{c1:""{c1}"",c2:""{c2}"",c3:{c3},c4:{c4},c5:{c5}}}";