Hello everyone
I wrote this code for common data in Elasticsearch, but I found that 10 line
Var hits = _context.Search (new search ()
{
Query = new Query (new MatchAllQuery ())
}, New SearchUrlParameters {Pretty = true});
#endregion
#region search2
Var hits1 = _context.Search (new search ()
{
Query = new Query (new MatchAllQuery ())
}, New SearchUrlParameters {Pretty = true});
List listl = new List ();
Foreach (var element in hits1.PayloadResult.Hits.HitsResult)
{
Foreach (var hit hits.PayloadResult.Hits.HitsResult)
{
If ((item.Source.idu! = Null) && (hit.Source.uid! = Null))
{
Console.WriteLine (item.Source.idu);
Console.WriteLine (hit.Source.uid);
If (item.Source.idu == hit.Source.uid)
{
If (hit.Source.email.Contains (searchTerm) ||
Hit.Source.last_name.Contains (searchTerm) ||
Hit.Source.first_name.Contains (searchTerm) ||
Item.Source.address.Contains (searchTerm) ||
Item.Source.societe.Contains (searchTerm)
)
{
Listl.Add (hit.Source.first_name + "" + hit.Source.last_name + "" + item.Source.address + "" + item.Source.societe + "" + hit.Source.email);
}
}
}
}