I want the guid of a contentType to be indexed as well, when I query for stuff.
I'll explain myself with some code:
public DoSomethingWithContent(int id){
IContent content = contentService.GetById(id);
//Key is a guid
Console.WriteLine(content.Key);
}
But now I'm in a situation where I don't have the id, but I do have the guid (don't ask why).
public GetTheContentFromAGuid(string guid){
//There is no method to do this with the contentService
//So the plan is to index the guid and get my data with Examine
var searcher = ExamineManager.Instance.SearchProviderCollection["MySearchIndex"];
var searchCriteria = searcher.CreateSearchCriteria();
var query = searchCriteria.Field("GuidKeyField", guid).Compile();
var result = searcher.Search(searchCriteria).FirstOrDefault();
}
So what field do I need to add in my ExamineIndex.config so that the key would be indexed?
Examine, guid
Hi there,
I want the guid of a contentType to be indexed as well, when I query for stuff. I'll explain myself with some code:
But now I'm in a situation where I don't have the id, but I do have the guid (don't ask why).
So what field do I need to add in my ExamineIndex.config so that the key would be indexed?
is working on a reply...