gigi81 / elastico Goto Github PK
View Code? Open in Web Editor NEWPowershell module for Elasticsearch
License: MIT License
Powershell module for Elasticsearch
License: MIT License
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?
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?
Is there a way to specify credentials when using Search-ElasticV5?
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
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.