1
我想使用下面的代碼片段獲取我的索引字段。我的索引的動態字段沒有出現在字段列表中
var fieldsList= DocumentStore.DatabaseCommands.GetIndex("IndexName").Fields.ToList();
這是返回與除動態字段的索引定義的所有字段的字符串列表(字段從返回_)。
這是我的索引的Map命令。
Map = products =>
from product in product s
select new
{
product.Title,
product.Subject,
product.From,
_ = product.
Attributes.Select(attribute =>
CreateField(attribute.Name, attribute.Value, false, true))
};
感謝您的回覆。 但是,當我在執行索引後查看Raven studio中的選擇列嚮導後,我可以看到選擇框中的所有字段。請讓我們知道是否有任何方法通過代碼檢索這些列列表。 – dkchittimilla