public Document Build(JObject json)
        {
            DocumentBuilderContext context = new DocumentBuilderContext(configuration, contentType, json);

            Document.Add(configuration.Serializer.Serialize(configuration.RawField, json));
            Visit(json, context);
            return(Document);
        }
예제 #2
0
        private DocumentBuilderContext(IIndexConfiguration configuration, DocumentBuilderContext parent, string contentType, JObject json, string path)
        {
            Configuration = configuration;
            Parent        = parent;
            Path          = path;
            Json          = json;
            ContentType   = contentType;

            strategy = new Lazy <IIndexingVisitorStrategy>(() => Configuration.Field.Strategy(ContentType, Path).IndexingStrategy);
        }
예제 #3
0
 private DocumentBuilderContext(DocumentBuilderContext parent, string path)
     : this(parent.Configuration, parent, parent.ContentType, parent.Json, path)
 {
 }