This commit is contained in:
@@ -220,32 +220,33 @@ namespace AyaNova.Biz
|
||||
private async Task SearchIndexAsync(Customer obj, bool isNew)
|
||||
{
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationId, obj.Id, BizType);
|
||||
SearchParams.AddText(obj.Notes)
|
||||
.AddText(obj.Name)
|
||||
.AddText(obj.Wiki)
|
||||
.AddText(obj.Tags)
|
||||
.AddText(obj.WebAddress)
|
||||
.AddText(obj.PopUpNotes)
|
||||
.AddText(obj.TechNotes)
|
||||
.AddText(obj.AccountNumber)
|
||||
.AddText(obj.Phone1)
|
||||
.AddText(obj.Phone2)
|
||||
.AddText(obj.Phone3)
|
||||
.AddText(obj.Phone4)
|
||||
.AddText(obj.Phone5)
|
||||
.AddText(obj.EmailAddress)
|
||||
.AddText(obj.PostAddress)
|
||||
.AddText(obj.PostCity)
|
||||
.AddText(obj.PostRegion)
|
||||
.AddText(obj.PostCountry)
|
||||
.AddText(obj.PostCode)
|
||||
.AddText(obj.Address)
|
||||
.AddText(obj.City)
|
||||
.AddText(obj.Region)
|
||||
.AddText(obj.Country)
|
||||
.AddText(obj.Latitude)
|
||||
.AddText(obj.Longitude)
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
// SearchParams.AddText(obj.Notes)
|
||||
// .AddText(obj.Name)
|
||||
// .AddText(obj.Wiki)
|
||||
// .AddText(obj.Tags)
|
||||
// .AddText(obj.WebAddress)
|
||||
// .AddText(obj.PopUpNotes)
|
||||
// .AddText(obj.TechNotes)
|
||||
// .AddText(obj.AccountNumber)
|
||||
// .AddText(obj.Phone1)
|
||||
// .AddText(obj.Phone2)
|
||||
// .AddText(obj.Phone3)
|
||||
// .AddText(obj.Phone4)
|
||||
// .AddText(obj.Phone5)
|
||||
// .AddText(obj.EmailAddress)
|
||||
// .AddText(obj.PostAddress)
|
||||
// .AddText(obj.PostCity)
|
||||
// .AddText(obj.PostRegion)
|
||||
// .AddText(obj.PostCountry)
|
||||
// .AddText(obj.PostCode)
|
||||
// .AddText(obj.Address)
|
||||
// .AddText(obj.City)
|
||||
// .AddText(obj.Region)
|
||||
// .AddText(obj.Country)
|
||||
// .AddText(obj.Latitude)
|
||||
// .AddText(obj.Longitude)
|
||||
// .AddCustomFields(obj.CustomFields);
|
||||
DigestSearchText(obj,SearchParams);
|
||||
if (isNew)
|
||||
await Search.ProcessNewObjectKeywordsAsync(SearchParams);
|
||||
else
|
||||
@@ -256,8 +257,41 @@ namespace AyaNova.Biz
|
||||
{
|
||||
var obj = await ct.Customer.SingleOrDefaultAsync(z => z.Id == id);
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
||||
if (obj != null)todo: test this out and see what comes back from various searches, is it correctly showing a summary?
|
||||
SearchParams.AddText(obj.Notes)
|
||||
DigestSearchText(obj,SearchParams);
|
||||
// if (obj != null)
|
||||
// SearchParams.AddText(obj.Notes)
|
||||
// .AddText(obj.Name)
|
||||
// .AddText(obj.Wiki)
|
||||
// .AddText(obj.Tags)
|
||||
// .AddText(obj.WebAddress)
|
||||
// .AddText(obj.PopUpNotes)
|
||||
// .AddText(obj.TechNotes)
|
||||
// .AddText(obj.AccountNumber)
|
||||
// .AddText(obj.Phone1)
|
||||
// .AddText(obj.Phone2)
|
||||
// .AddText(obj.Phone3)
|
||||
// .AddText(obj.Phone4)
|
||||
// .AddText(obj.Phone5)
|
||||
// .AddText(obj.EmailAddress)
|
||||
// .AddText(obj.PostAddress)
|
||||
// .AddText(obj.PostCity)
|
||||
// .AddText(obj.PostRegion)
|
||||
// .AddText(obj.PostCountry)
|
||||
// .AddText(obj.PostCode)
|
||||
// .AddText(obj.Address)
|
||||
// .AddText(obj.City)
|
||||
// .AddText(obj.Region)
|
||||
// .AddText(obj.Country)
|
||||
// .AddText(obj.Latitude)
|
||||
// .AddText(obj.Longitude)
|
||||
// .AddCustomFields(obj.CustomFields);
|
||||
return SearchParams;
|
||||
}
|
||||
|
||||
public void DigestSearchText(Customer obj, Search.SearchIndexProcessObjectParameters searchParams)
|
||||
{
|
||||
if (obj != null)
|
||||
searchParams.AddText(obj.Notes)
|
||||
.AddText(obj.Name)
|
||||
.AddText(obj.Wiki)
|
||||
.AddText(obj.Tags)
|
||||
@@ -282,11 +316,9 @@ namespace AyaNova.Biz
|
||||
.AddText(obj.Country)
|
||||
.AddText(obj.Latitude)
|
||||
.AddText(obj.Longitude)
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
return SearchParams;
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//VALIDATION
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user