c# - Elasticsearch NEST return matched field -
i using elasticsearch nest .net client perform full-text search. have looked around internet see if there way accomplish want do. want know if there way fieldname matched search string , count of documents matched on field. i have object tooks like class person{ public string firstname {get;set;} public string surname {get;set;} public string streetname {get;set;} ...... } so full-text search "parker" match on of these field want return json below: response: {[ { matchon: "firstname", records: [ { firstname: "parker", surname: "thomas", streetname: "main" }, { firstname: "parker", surname: "smith", streetname: "jfk" } ..... ] } ]}