private IndexingResult ExtractIndexDataFromDocument(AnonymousObjectToLuceneDocumentConverter anonymousObjectToLuceneDocumentConverter, DynamicJsonObject dynamicJsonObject) { var newDocIdAsObject = dynamicJsonObject.GetRootParentOrSelf().GetDocumentId(); var newDocId = newDocIdAsObject is DynamicNullObject ? null : (string)newDocIdAsObject; List<AbstractField> abstractFields; try { abstractFields = anonymousObjectToLuceneDocumentConverter.Index(((IDynamicJsonObject)dynamicJsonObject).Inner, Field.Store.NO).ToList(); } catch (InvalidShapeException e) { throw new InvalidSpatialShapeException(e, newDocId); } return new IndexingResult { Fields = abstractFields, NewDocId = newDocId, ShouldSkip = false }; }
private IndexingResult ExtractIndexDataFromDocument(AnonymousObjectToLuceneDocumentConverter anonymousObjectToLuceneDocumentConverter, DynamicJsonObject dynamicJsonObject) { var newDocId = dynamicJsonObject.GetRootParentOrSelf().GetDocumentId(); return new IndexingResult { Fields = anonymousObjectToLuceneDocumentConverter.Index(((IDynamicJsonObject)dynamicJsonObject).Inner, Field.Store.NO).ToList(), NewDocId = newDocId is DynamicNullObject ? null : (string)newDocId, ShouldSkip = false }; }