ScrollAll : .Net Framework versus .Net Core

           I have code performing scrolling query  that works fine under .Net Framework 7.4.2 but when rebuild under .Net Core and executed in that environment raise an Elastic exception as shown below.

Is there any difference between using ScrollAll under .Net Framework and .Net core ?

I use NEST 7.2.1, .Net standard library 2.0.3

-- Exception --

Message=scrolling search on /coint%2A/_search?typed_keys=true&scroll=5m with slice 0 was not valid on scroll iteration 0
at Nest.BlockingSubscribeExtensions.WaitOnObservable[TObservable,TObserve,TObserver](TObservable observable, TimeSpan maximumRunTime, Func3 factory) at Nest.BlockingSubscribeExtensions.Wait[T](IObservable1 observable, TimeSpan maximumRunTime, Action`1 onNext)
at Slb.Prism.DevTool.Library.RollupFlowCalls.Search.getList(ElasticClient esClient, String index, ILogger log) in D:<blabla>\DevTool.Service.ControlFlow\RollupFlowCalls\Search.cs:line 53
at ConsoleTestCore.Program.Main(String args) in D:<blabla>\ControlFlow\ConsoleTestCore\Program.cs:line 15

--- Code ---

   public static List<Record> getList(ElasticClient esClient, string index, ILogger log)
        if (log != null) log.LogInformation($"Entersearch");
        var seenDocuments = 0;
        var doccuments = new ConcurrentBag<IReadOnlyCollection<Source>>();
        DateTime gteTime = DateTime.Now.AddMinutes(-10);
        DateTime ltTime = DateTime.Now;
        List<Record> indexedList = new List<Record>();
        int para = 6;

        if (log != null) log.LogInformation($"Start search");
        esClient.ScrollAll<Source>("5m", para, s => s
        .MaxDegreeOfParallelism(para / 2)
        .Search(w => w
                        .Query(q => q
                            .Bool(b => b
                                .Filter(bf => bf
                                    .DateRange(dr => dr
                                       .Field(f => f.timestamp)
                                .Must(mu => mu
                                    .Match(ma => ma
                                        .Field(fi => fi.level)
        .Wait(TimeSpan.FromMinutes(5), r =>
            if (log != null) log.LogInformation($"In wait");
            Interlocked.Add(ref seenDocuments, r.SearchResponse.Hits.Count);
        if (log != null) log.LogInformation($"Out wait");

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.