ElasticSearch CreatePipeline в Visual Basic - PullRequest
       3

ElasticSearch CreatePipeline в Visual Basic

0 голосов
/ 04 апреля 2020

Я обновляю приложение Visual Basi c до версии 7.6.1 Elasticsearch. Net и NEST. Приведенный ниже код работал (как client.PutPipeline), но теперь я получаю сообщения об ошибках, в которых не найдено подходящих методов Processor или Field. Я посмотрел на C# семплов, которые делают то же самое, но я не понимаю, почему версия Visual Basi c больше не работает.

            Return Me.client.Ingest.PutPipeline("attachments",
                                        Function(p) p.Description("Document Attacment pipeline").Processors(
                                            Function(pr) pr.Attachment(Of IndexFile)(
                                                Function(a) a.Field(
                                                    Function(f) f.FileContent).TargetField(
                                                        Function(f) f.Attachment)
                                             ).Remove(Of IndexFile)(Function(r) r.Field(Function(f) f.FileContent))
                                        )).IsValid
BC30518 Overload resolution failed because no accessible 'Processors' can be called with these arguments:
    'Public Overloads Function Processors(processors As IEnumerable(Of IProcessor)) As PutPipelineDescriptor': Lambda expression cannot be converted to 'IEnumerable(Of IProcessor)' because 'IEnumerable(Of IProcessor)' is not a delegate type.
    'Public Overloads Function Processors(selector As Func(Of ProcessorsDescriptor, IPromise(Of IList(Of IProcessor)))) As PutPipelineDescriptor': Overload resolution
BC30518 failed because no accessible 'Field' can be called with these arguments:
    'Public Overloads Function Field(fields As Fields) As RemoveProcessorDescriptor(Of IndexFile)': Lambda expression cannot be converted to 'Fields' because 'Fields' is not a delegate type.
    'Public Overloads Function Field(selector As Func(Of FieldsDescriptor(Of IndexFile), IPromise(Of Fields))) As RemoveProcessorDescriptor(Of IndexFile)': 'FileContent' is not a member of 'FieldsDescriptor(Of IndexFile)'.
...