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"       }       .....     ]   } ]} 


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -