This commit is contained in:
@@ -220,32 +220,33 @@ namespace AyaNova.Biz
|
|||||||
private async Task SearchIndexAsync(Customer obj, bool isNew)
|
private async Task SearchIndexAsync(Customer obj, bool isNew)
|
||||||
{
|
{
|
||||||
var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationId, obj.Id, BizType);
|
var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationId, obj.Id, BizType);
|
||||||
SearchParams.AddText(obj.Notes)
|
// SearchParams.AddText(obj.Notes)
|
||||||
.AddText(obj.Name)
|
// .AddText(obj.Name)
|
||||||
.AddText(obj.Wiki)
|
// .AddText(obj.Wiki)
|
||||||
.AddText(obj.Tags)
|
// .AddText(obj.Tags)
|
||||||
.AddText(obj.WebAddress)
|
// .AddText(obj.WebAddress)
|
||||||
.AddText(obj.PopUpNotes)
|
// .AddText(obj.PopUpNotes)
|
||||||
.AddText(obj.TechNotes)
|
// .AddText(obj.TechNotes)
|
||||||
.AddText(obj.AccountNumber)
|
// .AddText(obj.AccountNumber)
|
||||||
.AddText(obj.Phone1)
|
// .AddText(obj.Phone1)
|
||||||
.AddText(obj.Phone2)
|
// .AddText(obj.Phone2)
|
||||||
.AddText(obj.Phone3)
|
// .AddText(obj.Phone3)
|
||||||
.AddText(obj.Phone4)
|
// .AddText(obj.Phone4)
|
||||||
.AddText(obj.Phone5)
|
// .AddText(obj.Phone5)
|
||||||
.AddText(obj.EmailAddress)
|
// .AddText(obj.EmailAddress)
|
||||||
.AddText(obj.PostAddress)
|
// .AddText(obj.PostAddress)
|
||||||
.AddText(obj.PostCity)
|
// .AddText(obj.PostCity)
|
||||||
.AddText(obj.PostRegion)
|
// .AddText(obj.PostRegion)
|
||||||
.AddText(obj.PostCountry)
|
// .AddText(obj.PostCountry)
|
||||||
.AddText(obj.PostCode)
|
// .AddText(obj.PostCode)
|
||||||
.AddText(obj.Address)
|
// .AddText(obj.Address)
|
||||||
.AddText(obj.City)
|
// .AddText(obj.City)
|
||||||
.AddText(obj.Region)
|
// .AddText(obj.Region)
|
||||||
.AddText(obj.Country)
|
// .AddText(obj.Country)
|
||||||
.AddText(obj.Latitude)
|
// .AddText(obj.Latitude)
|
||||||
.AddText(obj.Longitude)
|
// .AddText(obj.Longitude)
|
||||||
.AddCustomFields(obj.CustomFields);
|
// .AddCustomFields(obj.CustomFields);
|
||||||
|
DigestSearchText(obj,SearchParams);
|
||||||
if (isNew)
|
if (isNew)
|
||||||
await Search.ProcessNewObjectKeywordsAsync(SearchParams);
|
await Search.ProcessNewObjectKeywordsAsync(SearchParams);
|
||||||
else
|
else
|
||||||
@@ -256,8 +257,41 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
var obj = await ct.Customer.SingleOrDefaultAsync(z => z.Id == id);
|
var obj = await ct.Customer.SingleOrDefaultAsync(z => z.Id == id);
|
||||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
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?
|
DigestSearchText(obj,SearchParams);
|
||||||
SearchParams.AddText(obj.Notes)
|
// 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.Name)
|
||||||
.AddText(obj.Wiki)
|
.AddText(obj.Wiki)
|
||||||
.AddText(obj.Tags)
|
.AddText(obj.Tags)
|
||||||
@@ -282,11 +316,9 @@ namespace AyaNova.Biz
|
|||||||
.AddText(obj.Country)
|
.AddText(obj.Country)
|
||||||
.AddText(obj.Latitude)
|
.AddText(obj.Latitude)
|
||||||
.AddText(obj.Longitude)
|
.AddText(obj.Longitude)
|
||||||
.AddCustomFields(obj.CustomFields);
|
.AddCustomFields(obj.CustomFields);
|
||||||
return SearchParams;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//VALIDATION
|
//VALIDATION
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user