Giter Site home page Giter Site logo

gigi81 / elastico Goto Github PK

View Code? Open in Web Editor NEW
28.0 5.0 6.0 1.57 MB

Powershell module for Elasticsearch

License: MIT License

PowerShell 14.99% C# 82.93% Batchfile 2.09%
powershell elasticsearch linux windows dotnet-core cmdlet backup powershell-module powershell-core powershell-gallery

elastico's People

Contributors

gigi81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

elastico's Issues

Implement scrollapi

I tested the new -From parameter but it doesn't seem to be working properly. For example:

Search-ElasticV5 -Node es01.test.int:9200 -Index logstash-windows-* -from 10000 -Size 100

Throws an error of:

Search-ElasticV5 : ServerError: 500Type: search_phase_execution_exception Reason: "all shards failed" CausedBy: "Type: query_phase_execution_exception Reason: "Result window is too large, from + size must be less than or equal to: [10000] but was [10100]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.""

Same search but with size of 10,000:
Search-ElasticV5 -Node es01.test.int:9200 -Index logstash-windows-* -from 10000 -Size 10000

Search-ElasticV5 : ServerError: 500Type: search_phase_execution_exception Reason: "all shards failed" CausedBy: "Type: query_phase_execution_exception Reason: "Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.""

Do you know what would be causing this?

Limited to 10,000 results

Currently if I have a query with results larger than 10,000 I get the following error message:

"Result window is too large, from + size must be less than or equal to: [10000] but
was [100000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."

Is there any way the scroll api can be added to allow retrieving more results?

Security support

Is there a way to specify credentials when using Search-ElasticV5?

If start from scratch

would it be better to write just pwsh module on powershell with json quotes isntead of C# boilerplate? or may be es has some kind of swagger/openapi generator?

Unclear how to use....

Hi Gigi,

Thanks for the great powershell module, but I'm breaking my head over how to use it...

Install-Module Elastico

Get-ElasticV5ClusterHealth -Node "http://localhost:9200"
$result = Search-ElasticV5 -Node $Node -Index abbacampingsindex -Fields "websiteFields.campsiteId","websiteFields.images.image" -Size 100
$documents = $result.Documents
$documents.GetEnumerator() | ForEach-Object {
    $json = $_.websiteFields | ConvertTo-Json
    $json
}

does not work.... I see data, but can't get it out. I can convert to JSON string with ConvertTo-Json, but would like to access the fields.

Do you have some sample PowerShell code to show how to query and use results?

Regards,
Serge

Search-ElasticV2 : ServerError: 400Type: search_phase_execution_exception Reason: "all shards failed"

Every time I try to run a basic query I get this error:
Search-ElasticV2 : ServerError: 400Type: search_phase_execution_exception Reason: "all shards failed"
I am using the query Kibana uses for a standard query with all the "fluff" stripped out, so I'm pretty sure the syntax is correct. I can run Get-ElasticV2Index on my cluster with no problems.

Can you provide me with a simple query (return 50 records or something) that I can try and troubleshoot my usage with?

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.