Adding new fields to search

we are adding some fileds to the documents  by using 

static void Events_BeforeBulkIndex(BeforeBulkIndexingEventArgs e){
foreach (var doc in e.Documents)
			if (doc.ContentTypeId == apiBlogPost.ContentTypeId)
				BlogPost blogPost = apiBlogPost.Get(doc.ContentId);
					if (blogPost == null) return;
					var labelvalue = blogPost.ExtendedAttributes["somefiled"]?.Value;
					if (!string.IsNullOrEmpty(labelvalue))
						doc.AddField("key", labelvalue);

But if we search for the value , we are unable to find them in search results

Parents Reply
  • Hi Kevin,

    Thanks for helping with this. we are able to retrieve the data now. 

    we are using the same metadata plugin to store some other information like below

    wiki1 -> key:label -> value:label1

    wiki2 ->key:label -> value:label1,label2 

    if we search for metadata_label:label1 it gives  wiki1 but not wiki2

    if we search for metadata_label:label1,label2 it gives wiki2 but for metadata_label:label2 it gives nothing .

    If this was the default way, how can we make the Field Search fully functional

No Data