Git Product home page Git Product logo

Comments (7)

gigi81 avatar gigi81 commented on June 2, 2024

Hi @SMAPPER
The -Form parameter is actually working. The problem is still the 10000 records of #2.
As suggested by the error message you get, I need to add support for the scroll api in the cmdlet.
I will try to have a look at it this weekend.

from elastico.

SMAPPER avatar SMAPPER commented on June 2, 2024

Have you been able to look into this more? I really appreciate what you are doing with this module.

I originally thought when you added the -From that I could increment and do this:

Search-ElasticV5 -Node es01:9200 -Index logstash-* -Size 10000 -From 0
Search-ElasticV5 -Node es01:9200 -Index logstash-* -Size 10000 -From 10000
Search-ElasticV5 -Node es01:9200 -Index logstash-* -Size 10000 -From 20000

And so on and so forth. Then it would just be might job to create a proper loop based on a count. Right now it looks like it is currently adding the from parameter with the size parameter and searching for more than 10,000 records which causes this to fail.

Example:

Search-ElasticV5 -Node es01:9200 -Index logstash-* -Size 10000 -From 0

This successfully pulls back 10,000 records.

Search-ElasticV5 -Node es01:9200 -Index logstash-* -Size 10000 -From 10000

This fails stating it is trying to pull 20,000 records.

Search-ElasticV5 -Node es01:9200 -Index logstash-* -Size 10000 -From 20000

This fails stating it is trying to pull 30,000 records.

from elastico.

gigi81 avatar gigi81 commented on June 2, 2024

Hi @SMAPPER
In order to do that with the current module you need to change the index.max_result_window index setting, by increasing it for example to 30000 and you won't get the error.

The proper fix would be for the powershell module to implement the scrollapi. I implemented the feature but during my tests, it only works with elasticsearch v1 and v2 but not v5. As I'm currently investigating where exactly the issue comes from, the change is still not published. I will get back here when I manage to find more time to investigate the problem.

from elastico.

SMAPPER avatar SMAPPER commented on June 2, 2024

from elastico.

gigi81 avatar gigi81 commented on June 2, 2024

Hi,
I published a new version of the module that implements the scroll api.
So forget about the multiple -From -Size.
Just have a first call to the search with the -Scroll switch.
The first call will now return some records and also a ScrollId
You then need to have further calls just specifing the -ScrollId 'id' to fetch more records until the call returns no records.
Hope this is clear... try and let me know how it goes.

from elastico.

SMAPPER avatar SMAPPER commented on June 2, 2024

Just had time to sit down and play with this. Not sure I'm using it right though. Could you provide an example of using this to rotate through results until all have been pulled out?

from elastico.

gigi81 avatar gigi81 commented on June 2, 2024

I haven't seen any update recently here so considering this closed.

from elastico.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.