public static IEnumerable<AbstractField> Index(JObject document, IndexDefinition indexDefinition, Field.Store defaultStorage) { return (from property in document.Cast<JProperty>() let name = property.Name where name != Constants.DocumentIdFieldName let value = GetPropertyValue(property) from field in CreateFields(name, value, indexDefinition, defaultStorage) select field); }
public static IEnumerable<AbstractField> Index(JObject document, IndexDefinition indexDefinition, Field.Store defaultStorage) { return (from property in document.Cast<JProperty>() let name = property.Name where name != "__document_id" let value = GetPropertyValue(property) where value != null select Createfield(name, value, indexDefinition, defaultStorage)); }