Try our conversational search powered by Generative AI!

Using EpiFind nuget package to index, how do I set the ID


I have an object like below. I have defined the _id field but I do NOT get the value I passed set as the ID.

How do I force it to use MY id that I pass it?

    public  class MarketReportItem : ISearchContent

	    public string _index { get; set; }
        public string _type { get; set; }
        public string DocumentGuid { get; set; }
        public string FileName { get; set; }
        public string _Type { get; set; }
        public string _id { get; set; }

Jan 18, 2019 19:42

Please post on forum related to EpiServer Find 

Edited, Jan 21, 2019 2:12

Moved to Episerver Find Forum

Jan 21, 2019 4:06

Not my question Binh - I just helped by moving to the right forum.

Thanks the for suggested link though - hopefully pk1023 finds it useful!

Jan 21, 2019 5:15

Oh, I confused a bit :)

Jan 21, 2019 7:21

The easiest way is to use attribute 


But you can also do it in the setup of Find, saying that for this class, this property is the id.

Read more here:

Jan 21, 2019 7:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.