├── .gitignore
├── LICENSE
├── README.md
├── appveyor.yml
├── docs
└── images
│ ├── REST_ES_enpoint_or_any_url.jpg
│ ├── analyze_and_highlight_tokens.jpg
│ ├── cluster_info.jpg
│ ├── elastic.png
│ ├── intellisense.jpg
│ ├── theme_dark_accents_list.jpg
│ ├── url_suggest.jpg
│ ├── view_data.jpg
│ └── view_data_preview_nested_objects.jpg
├── es-versions.txt
└── src
├── ElasticOps.Commands.Tests
├── AnalyzeCommandsTests.fs
├── ClusterInfoCommands.fs
├── Config.fs
├── Config.yaml
├── ElasticOps.Commands.Tests.fsproj
├── TestsHelper.fs
├── app.config
├── data
│ ├── default
│ │ ├── 0.90.13.0
│ │ │ ├── _cluster health
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _cluster state
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _nodes
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products book _mapping_pretty
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── _search
│ │ │ │ └── POST
│ │ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ ├── _stats
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── products _analyze_field=book.description
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ └── products _mapping
│ │ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── 1.0.3.0
│ │ │ ├── _cluster health
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _cluster state
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _nodes
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products book _mapping_pretty
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── _search
│ │ │ │ └── POST
│ │ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ ├── _stats
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── products _analyze_field=book.description
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ └── products _mapping
│ │ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── 1.1.2.0
│ │ │ ├── _cluster health
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _cluster state
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _nodes
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products book _mapping_pretty
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── _search
│ │ │ │ └── POST
│ │ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ ├── _stats
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── products _analyze_field=book.description
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ └── products _mapping
│ │ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── 1.2.4.0
│ │ │ ├── _cluster health
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _cluster state
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _nodes
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products book _mapping_pretty
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── _search
│ │ │ │ └── POST
│ │ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ ├── _stats
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── products _analyze_field=book.description
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ └── products _mapping
│ │ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── 1.3.7.0
│ │ │ ├── _cluster health
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _cluster state
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _nodes
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products book _mapping_pretty
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── _search
│ │ │ │ └── POST
│ │ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ ├── _stats
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── products _analyze_field=book.description
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ └── products _mapping
│ │ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── 1.4.0.0
│ │ │ ├── _cluster health
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _cluster state
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _nodes
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products book _mapping_pretty
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── _search
│ │ │ │ └── POST
│ │ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ ├── _stats
│ │ │ │ └── GET
│ │ │ │ │ └── result.json
│ │ │ ├── products _analyze_analyzer=standard
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── products _analyze_field=book.description
│ │ │ │ └── POST
│ │ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ └── products _mapping
│ │ │ │ └── GET
│ │ │ │ └── result.json
│ │ └── 1.4.2.0
│ │ │ ├── _cluster health
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ │ ├── _cluster state
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ │ ├── _nodes
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ │ ├── products book _mapping_pretty
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ │ ├── _analyze_analyzer=standard
│ │ │ └── POST
│ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── _search
│ │ │ └── POST
│ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ ├── _stats
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ │ ├── products _analyze_analyzer=standard
│ │ │ └── POST
│ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ ├── products _analyze_field=book.description
│ │ │ └── POST
│ │ │ │ ├── body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ │ └── result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json
│ │ │ └── products _mapping
│ │ │ └── GET
│ │ │ └── result.json
│ └── empty
│ │ ├── 0.90.13.0
│ │ ├── _cluster health
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _cluster state
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _nodes
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _search
│ │ │ └── POST
│ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ └── _stats
│ │ │ └── GET
│ │ │ └── result.json
│ │ ├── 1.0.3.0
│ │ ├── _cluster health
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _cluster state
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _nodes
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _search
│ │ │ └── POST
│ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ └── _stats
│ │ │ └── GET
│ │ │ └── result.json
│ │ ├── 1.1.2.0
│ │ ├── _cluster health
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _cluster state
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _nodes
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _search
│ │ │ └── POST
│ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ └── _stats
│ │ │ └── GET
│ │ │ └── result.json
│ │ ├── 1.2.4.0
│ │ ├── _cluster health
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _cluster state
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _nodes
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _search
│ │ │ └── POST
│ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ └── _stats
│ │ │ └── GET
│ │ │ └── result.json
│ │ ├── 1.3.7.0
│ │ ├── _cluster health
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _cluster state
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _nodes
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _search
│ │ │ └── POST
│ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ └── _stats
│ │ │ └── GET
│ │ │ └── result.json
│ │ ├── 1.4.0.0
│ │ ├── _cluster health
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _cluster state
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _nodes
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── products book _mapping_pretty
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ ├── _search
│ │ │ └── POST
│ │ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ ├── _stats
│ │ │ └── GET
│ │ │ │ └── result.json
│ │ └── products _mapping
│ │ │ └── GET
│ │ │ └── result.json
│ │ └── 1.4.2.0
│ │ ├── _cluster health
│ │ └── GET
│ │ │ └── result.json
│ │ ├── _cluster state
│ │ └── GET
│ │ │ └── result.json
│ │ ├── _nodes
│ │ └── GET
│ │ │ └── result.json
│ │ ├── _search
│ │ └── POST
│ │ │ ├── body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ │ └── result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json
│ │ └── _stats
│ │ └── GET
│ │ └── result.json
└── packages.config
├── ElasticOps.Commands
├── Analyze.fs
├── AssemblyInfo.fs
├── Attributes.fs
├── CList.fs
├── ClusterInfo.fs
├── Command.fs
├── CommandBus.fs
├── CommandResult.fs
├── Connection.fs
├── DataView.fs
├── ElasticOps.Com.v2.ncrunchproject
├── ElasticOps.Commands.fsproj
├── HandlerFinder.fs
├── HeartBeat.fs
├── Index.fs
├── REST.fs
├── Utils.fs
├── Version.fs
└── packages.config
├── ElasticOps.Configuration
├── ElasticOps.Configuration.fsproj
├── ElasticOpsConfig.fs
└── packages.config
├── ElasticOps.Intellisense.Tests
├── DSLPathTests.fs
├── ElasticOps.Intellisense.Tests.fsproj
├── IntellisenseEngineTests.fs
├── Library1.fs
├── SuggestEngineTests.fs
├── app.config
├── hugeESJsonQuery.json
├── packages.config
└── randomComplexTestsJson.json
├── ElasticOps.Intellisense
├── ElasticOps.Intellisense.fsproj
├── Intellisense.fs
├── Intellisense.fsi
├── String.fs
├── Structures.fs
├── SuggestEngine.fs
└── packages.config
├── ElasticOps.Parsing.Tests
├── ElasticOps.Parsing.Tests.fsproj
├── IntellisenseParsingTests.fs
├── ParsingTests.fs
├── app.config
├── hugeJson.json
├── packages.config
└── randomComplexTestsJson.json
├── ElasticOps.Parsing
├── .gitignore
├── ElasticOps.Parsing.fsproj
├── IntellisenseLexer.fs
├── IntellisenseLexer.fsl
├── IntellisenseParser.fs
├── IntellisenseParser.fsi
├── IntellisenseParser.fsy
├── JsonLexer.fs
├── JsonLexer.fsl
├── JsonParser.fs
├── JsonParser.fsi
├── JsonParser.fsy
├── Processing.fs
├── Structures.fs
├── app.config
└── packages.config
├── ElasticOps.TestData
├── Analyzer.json
├── App.config
├── Book.cs
├── CD.cs
├── ElasticOps.TestData.csproj
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
└── packages.config
├── ElasticOps.Tests
├── ElasticOps.Tests.csproj
├── Properties
│ └── AssemblyInfo.cs
├── ViewModelsTests
│ └── PagerTests.cs
├── app.config
└── packages.config
├── ElasticOps.sln
├── ElasticOps.sln.DotSettings
├── ElasticOps
├── App.config
├── Assets
│ ├── SplashScreen.png
│ ├── icon.ico
│ └── icon.png
├── Attributes
│ └── PriorityAttribute.cs
├── Behaviors
│ ├── Autocomplete
│ │ ├── AutocompleteItem.cs
│ │ ├── AutocompleteMode.cs
│ │ ├── IndexAutocompleteCollection.cs
│ │ └── UrlAutocompleteCollection.cs
│ ├── AvalonEditBehavior.cs
│ ├── CodeCompletionData.cs
│ ├── IndexAutoCompleteBoxBehavior.cs
│ ├── OnlyDigitsInTextBoxBehavior.cs
│ ├── UrlAutoCompleteBoxBehavior.cs
│ └── intellisenseBehavior.cs
├── CodeAnalysisRules.ruleset
├── CodeEditor
│ └── BraceFoldingStrategy.cs
├── Converters
│ ├── BoolToOppositeVisibilityConverter.cs
│ ├── BoolToVisibilityConverter.cs
│ └── HumanizeBigNumbersConverter.cs
├── DIModules
│ ├── CaliburnMicroModule.cs
│ ├── InfrastractureModel.cs
│ └── ViewsModule.cs
├── DependencyProperties
│ └── AutoCompleteBoxProperties.cs
├── ElasticOps.csproj
├── Ensure.cs
├── Events
│ ├── AccentChangedEvent.cs
│ ├── ErrorOccurredEvent.cs
│ ├── GoToStudioEvent.cs
│ ├── LogEntryCreatedEvent.cs
│ ├── NewConnectionEvent.cs
│ ├── PreviewValueEvent.cs
│ ├── RefreshEvent.cs
│ └── ThemeChangedEvent.cs
├── Extensions
│ ├── CollectionExtensions.cs
│ ├── IntExtensions.cs
│ ├── LongExtensions.cs
│ └── StringExtensions.cs
├── GlobalSuppressions.cs
├── Infrastructure
│ ├── AppBootstrapper.cs
│ ├── Command.cs
│ └── Infrastructure.cs
├── Predef.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Resources
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AppStyles.xaml
│ ├── CustomIcons.xaml
│ ├── Entypo-license.txt
│ ├── Entypo.ttf
│ ├── Icons.xaml
│ ├── Icons
│ │ └── paste.png
│ ├── QueryDarkHighlightingRules.xshd
│ ├── QueryLightHighlightingRules.xshd
│ ├── WindowsIcons-license.txt
│ └── icon.ico
├── Services
│ ├── ClusterDataCache.cs
│ ├── ConfigService.cs
│ ├── Index.cs
│ └── ThemeService.cs
├── ViewModels
│ ├── AccentColorMenuData.cs
│ ├── AppThemeMenuData.cs
│ ├── ClusterConnectedAutoRefreshScreen.cs
│ ├── ClusterConnectionViewModel.cs
│ ├── ComboBoxItemViewModel.cs
│ ├── Controls
│ │ └── CodeEditorViewModel.cs
│ ├── ElasticPropertyViewModel.cs
│ ├── FooterViewModel.cs
│ ├── ManagementScreens
│ │ ├── AnalyzeViewModel.cs
│ │ ├── ClusterInfoScreenViewModel.cs
│ │ ├── ClusterInfoScreenViewModels
│ │ │ ├── BasicInfoViewModel.cs
│ │ │ ├── DocumentsInfoViewModel.cs
│ │ │ ├── IndexInfoViewModel.cs
│ │ │ ├── IndicesInfoViewModel.cs
│ │ │ ├── MappingsInfoViewModel.cs
│ │ │ ├── NodeInfoViewModel.cs
│ │ │ └── NodesInfoViewModel.cs
│ │ ├── ConsoleViewModel.cs
│ │ ├── DataViewerViewModel.cs
│ │ ├── IManagementScreen.cs
│ │ ├── QueryViewModel.cs
│ │ └── RESTScreenViewModel.cs
│ ├── PaggerViewModel.cs
│ ├── ShellViewModel.cs
│ ├── StudioViewModel.cs
│ └── TypesListViewModel.cs
├── Views
│ ├── ClusterConnectionView.xaml
│ ├── ClusterConnectionView.xaml.cs
│ ├── Controls
│ │ ├── CodeEditor.xaml
│ │ └── CodeEditor.xaml.cs
│ ├── ElasticPropertyView.xaml
│ ├── ElasticPropertyView.xaml.cs
│ ├── FooterView.xaml
│ ├── FooterView.xaml.cs
│ ├── ManagementScreens
│ │ ├── AnalyzeView.xaml
│ │ ├── AnalyzeView.xaml.cs
│ │ ├── BasicInfoView.xaml
│ │ ├── BasicInfoView.xaml.cs
│ │ ├── ClusterInfoScreenView.xaml
│ │ ├── ClusterInfoScreenView.xaml.cs
│ │ ├── ConsoleView.xaml
│ │ ├── ConsoleView.xaml.cs
│ │ ├── DataViewerView.xaml
│ │ ├── DataViewerView.xaml.cs
│ │ ├── DocumentsInfoView.xaml
│ │ ├── DocumentsInfoView.xaml.cs
│ │ ├── IndexInfoView.xaml
│ │ ├── IndexInfoView.xaml.cs
│ │ ├── IndicesInfoView.xaml
│ │ ├── IndicesInfoView.xaml.cs
│ │ ├── MappingsInfoView.xaml
│ │ ├── MappingsInfoView.xaml.cs
│ │ ├── NodeInfoView.xaml
│ │ ├── NodeInfoView.xaml.cs
│ │ ├── NodesInfoView.xaml
│ │ ├── NodesInfoView.xaml.cs
│ │ ├── QueryView.xaml
│ │ ├── QueryView.xaml.cs
│ │ ├── RESTScreenView.xaml
│ │ └── RESTScreenView.xaml.cs
│ ├── Pagger.xaml
│ ├── Pagger.xaml.cs
│ ├── ShellView.xaml
│ ├── ShellView.xaml.cs
│ ├── StudioView.xaml
│ ├── StudioView.xaml.cs
│ ├── TypesListView.xaml
│ └── TypesListView.xaml.cs
└── packages.config
└── SolutionItems
├── Config.yaml
├── FsLexYacc.6.0.4
├── FSharp.Core.dll
├── FsLexYacc.Build.Tasks.dll
└── FsLexYacc.targets
├── IntellisenseConfig.yaml
├── IntellisenseRules_mapping.json
└── IntellisenseRules_search.json
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | /src/*.suo
3 | /src/ElasticOps/bin
4 | /src/ElasticOps/obj
5 |
6 |
7 | */obj/Debug/*
8 | */bin/Debug/*
9 |
10 | #ignore thumbnails created by windows
11 | Thumbs.db
12 | #Ignore files build by Visual Studio
13 | *.obj
14 | *.exe
15 | *.pdb
16 | *.user
17 | *.aps
18 | *.pch
19 | *.vspscc
20 | *_i.c
21 | *_p.c
22 | *.ncb
23 | *.suo
24 | *.tlb
25 | *.tlh
26 | *.bak
27 | *.cache
28 | *.ilk
29 | *.orig
30 | *.log
31 | [Dd]ebug*/
32 | *.lib
33 | *.sbr
34 | obj/
35 | [Rr]elease*/
36 | _ReSharper*/
37 | [Tt]est[Rr]esult*
38 |
39 | src/ElasticOps.v2.ncrunchsolution
40 | src/_NCrunch_ElasticOps
41 |
42 | src/packages
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 belczyk
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Elastic Ops
2 | ==========
3 |
4 |
5 | ElasticOps is a desktop application which allows you to manage ElasticSearch cluster.
6 | It allows you to :
7 | * [See basic cluster information ](#user-content-cluster)
8 | - Nodes
9 | - Indices
10 | - Document counts
11 | - Mappings
12 | * [Query nodes ](#user-content-query) - all endpoints are available
13 | - Editor contains intellisense for _search and _mapping endpoints (more are comming)
14 | - Indices, types and endpoints are suggested
15 | * [Analyze](#user-content-analyze) - see how ElasticSearch sees your data
16 | * [View your documents](#user-content-view-data) - simply select index and type and you can browse docuemnts as sql table
17 | * [Perform any REST request](#user-content-rest) - to ElasticSearch or any other API
18 | * [Play with themes](#user-content-themes) - just for fun :)
19 |
20 | Cluster
21 | -------
22 | 
23 |
24 | Query
25 | -------
26 | Editor supports intellisense (real intellisense, it's aware in which part of the query is cursor and based on that suggests available options).
27 |
28 | 
29 |
30 | It also supports URL autocomplete. Index names, types and endpoints are suggested.
31 |
32 | 
33 |
34 | Analyze
35 | -------
36 | Analyze view allows you to send text to ElasticSearch and retrive list of tokens. You can analyze text using cluster or index analyzers. You can also make ElasticSearch to use the same analyzer as is used to analyzed given field.
37 |
38 | Select a token on the list to highlight given token in original text.
39 |
40 | 
41 |
42 | View data
43 | ---------
44 | 
45 |
46 |
47 | REST
48 | -------
49 | 
50 |
51 |
52 | Themes
53 | -------
54 | Just for fun you have control over application style. You can choose between light and dark theme and also among 23 different accents.
55 |
56 | 
57 |
58 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 0.0.{build}
2 | before_build:
3 | - nuget restore src\ElasticOps.sln -Verbosity quiet
4 | build:
5 | verbosity: minimal
--------------------------------------------------------------------------------
/docs/images/REST_ES_enpoint_or_any_url.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/REST_ES_enpoint_or_any_url.jpg
--------------------------------------------------------------------------------
/docs/images/analyze_and_highlight_tokens.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/analyze_and_highlight_tokens.jpg
--------------------------------------------------------------------------------
/docs/images/cluster_info.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/cluster_info.jpg
--------------------------------------------------------------------------------
/docs/images/elastic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/elastic.png
--------------------------------------------------------------------------------
/docs/images/intellisense.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/intellisense.jpg
--------------------------------------------------------------------------------
/docs/images/theme_dark_accents_list.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/theme_dark_accents_list.jpg
--------------------------------------------------------------------------------
/docs/images/url_suggest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/url_suggest.jpg
--------------------------------------------------------------------------------
/docs/images/view_data.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/view_data.jpg
--------------------------------------------------------------------------------
/docs/images/view_data_preview_nested_objects.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/docs/images/view_data_preview_nested_objects.jpg
--------------------------------------------------------------------------------
/es-versions.txt:
--------------------------------------------------------------------------------
1 | 0-90-13
2 | 1-0-0
3 | 1-0-1
4 | 1-0-2
5 | 1-0-3
6 | 1-1-0
7 | 1-1-1
8 | 1-1-2
9 | 1-2-1
10 | 1-2-2
11 | 1-2-3
12 | 1-2-4
13 | 1-3-0
14 | 1-3-1
15 | 1-3-2
16 | 1-3-3
17 | 1-3-4
18 | 1-3-5
19 | 1-3-6
20 | 1-3-7
21 | 1-4-0
22 | 1-4-1
23 | 1-4-2
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/AnalyzeCommandsTests.fs:
--------------------------------------------------------------------------------
1 | module AnalyzeCommandsTests
2 | open NUnit.Framework
3 | open ElasticOps.Commands
4 | open FsUnit
5 | open System.Linq
6 |
7 | []
8 | let ``Analyze can be executed without errors`` () =
9 | (fun con -> new Analyze.AnalyzeCommand(con,"standard","wlazl kotek na plotek i mruuu-czy"))
10 | |> executeForAllConnections
11 | |> List.map (fun x ->
12 | x.Success |> should be True
13 | x.Result.Count() |> should be (greaterThan 0))
14 | |> ignore
15 |
16 | []
17 | let ``Analyze with index analyzer can be executed without errors`` () =
18 | (fun con -> new Analyze.AnalyzeWithIndexAnalyzerCommand(con,"products","standard","wlazl kotek na plotek i mruuu-czy"))
19 | |> executeForAllConnections
20 | |> List.map (fun x ->
21 | x.Success |> should be True
22 | x.Result.Count() |> should be (greaterThan 0))
23 | |> ignore
24 |
25 | []
26 | let ``Analyze with field analyzer can be executed without errors`` () =
27 | (fun con -> new Analyze.AnalyzeWithFieldAnalyzerCommand(con,"products","book.description","wlazl kotek na plotek i mruuu-czy"))
28 | |> executeForAllConnections
29 | |> List.map (fun x ->
30 | x.Success |> should be True
31 | x.Result.Count() |> should be (greaterThan 0))
32 | |> ignore
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/Config.fs:
--------------------------------------------------------------------------------
1 | module Config
2 | open FSharp.Configuration
3 |
4 | type CommandsTestsConfig = YamlConfig<"Config.yaml">
5 |
6 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/Config.yaml:
--------------------------------------------------------------------------------
1 | IsOfflineMode : true
2 | DefaultSetName: default
3 | #paths must end with \
4 | ReadPath : ..\..\data\
5 | SavePath : ..\..\data\
6 | ElasticSearchNodesEndpoints:
7 | - http://localhost:9200
8 | - http://localhost:9913
9 | - http://localhost:9112
10 | - http://localhost:9103
11 | - http://localhost:9124
12 | - http://localhost:9137
13 | - http://localhost:9142
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_0_90_13","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_0_90_13","version":6,"master_node":"vDW1ILpITASwa_7Xh7nVbA","blocks":{},"nodes":{"vDW1ILpITASwa_7Xh7nVbA":{"name":"Volla","transport_address":"inet[/10.1.1.4:8913]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index.number_of_replicas":"0","index.number_of_shards":"1","index.version.created":"901399","index.uuid":"4unnImJ8TjqMCgBKh5FbdA"},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"vDW1ILpITASwa_7Xh7nVbA","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"vDW1ILpITASwa_7Xh7nVbA":[{"state":"STARTED","primary":true,"node":"vDW1ILpITASwa_7Xh7nVbA","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/ _nodes/GET/result.json:
--------------------------------------------------------------------------------
1 | {"ok":true,"cluster_name":"elasticsearch_0_90_13","nodes":{"vDW1ILpITASwa_7Xh7nVbA":{"name":"Volla","transport_address":"inet[/10.1.1.4:8913]","hostname":"caldeum","version":"0.90.13","http_address":"inet[/10.1.1.4:9913]"}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "book" : {
3 | "properties" : {
4 | "description" : {
5 | "type" : "string"
6 | },
7 | "id" : {
8 | "type" : "integer"
9 | },
10 | "title" : {
11 | "type" : "string"
12 | },
13 | "year" : {
14 | "type" : "integer"
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/_analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/_analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/products _analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/products _analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/products _analyze_field=book.description/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/products _analyze_field=book.description/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/0.90.13.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_0_3","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_0_3","version":7,"master_node":"jOq254KPSjyPO9TAHXt3Vg","blocks":{},"nodes":{"jOq254KPSjyPO9TAHXt3Vg":{"name":"Thirty-Three","transport_address":"inet[/10.1.1.4:8103]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"ZNnomGvhSDigVDneAqZX-Q","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1000399"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"jOq254KPSjyPO9TAHXt3Vg","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"jOq254KPSjyPO9TAHXt3Vg":[{"state":"STARTED","primary":true,"node":"jOq254KPSjyPO9TAHXt3Vg","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "products" : {
3 | "mappings" : {
4 | "book" : {
5 | "properties" : {
6 | "description" : {
7 | "type" : "string"
8 | },
9 | "id" : {
10 | "type" : "integer"
11 | },
12 | "title" : {
13 | "type" : "string"
14 | },
15 | "year" : {
16 | "type" : "integer"
17 | }
18 | }
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/_analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/_analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/products _analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/products _analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/products _analyze_field=book.description/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/products _analyze_field=book.description/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.0.3.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"mappings":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_1_2","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_1_2","version":7,"master_node":"-UZoFS-7RTO2vTGMxEEAJg","blocks":{},"nodes":{"-UZoFS-7RTO2vTGMxEEAJg":{"name":"Talisman","transport_address":"inet[/10.1.1.4:8112]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"Laoe5-xdSuq0aU7kXRkwBg","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1010299"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"-UZoFS-7RTO2vTGMxEEAJg","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"-UZoFS-7RTO2vTGMxEEAJg":[{"state":"STARTED","primary":true,"node":"-UZoFS-7RTO2vTGMxEEAJg","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "products" : {
3 | "mappings" : {
4 | "book" : {
5 | "properties" : {
6 | "description" : {
7 | "type" : "string"
8 | },
9 | "id" : {
10 | "type" : "integer"
11 | },
12 | "title" : {
13 | "type" : "string"
14 | },
15 | "year" : {
16 | "type" : "integer"
17 | }
18 | }
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/_analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/_analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/products _analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/products _analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/products _analyze_field=book.description/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/products _analyze_field=book.description/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.1.2.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"mappings":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_2_4","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_2_4","version":7,"master_node":"c3Zw5rtvQQqlCoMBcNV2Ig","blocks":{},"nodes":{"c3Zw5rtvQQqlCoMBcNV2Ig":{"name":"Eugene Judd","transport_address":"inet[/10.1.1.4:8124]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"fauGC-OiTm-RplqB4-Xzmg","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1020499"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"c3Zw5rtvQQqlCoMBcNV2Ig","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"c3Zw5rtvQQqlCoMBcNV2Ig":[{"state":"STARTED","primary":true,"node":"c3Zw5rtvQQqlCoMBcNV2Ig","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "products" : {
3 | "mappings" : {
4 | "book" : {
5 | "properties" : {
6 | "description" : {
7 | "type" : "string"
8 | },
9 | "id" : {
10 | "type" : "integer"
11 | },
12 | "title" : {
13 | "type" : "string"
14 | },
15 | "year" : {
16 | "type" : "integer"
17 | }
18 | }
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/_analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/_analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/products _analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/products _analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/products _analyze_field=book.description/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/products _analyze_field=book.description/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.2.4.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"mappings":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_3_7","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_3_7","version":6,"master_node":"-cDY8XAoT3G8CZ1jM2mt2Q","blocks":{},"nodes":{"-cDY8XAoT3G8CZ1jM2mt2Q":{"name":"Stunner","transport_address":"inet[/10.1.1.4:8137]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"WpKE1zzwTiixkJezWUq35w","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1030799"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"-cDY8XAoT3G8CZ1jM2mt2Q","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"-cDY8XAoT3G8CZ1jM2mt2Q":[{"state":"STARTED","primary":true,"node":"-cDY8XAoT3G8CZ1jM2mt2Q","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "products" : {
3 | "mappings" : {
4 | "book" : {
5 | "properties" : {
6 | "description" : {
7 | "type" : "string"
8 | },
9 | "id" : {
10 | "type" : "integer"
11 | },
12 | "title" : {
13 | "type" : "string"
14 | },
15 | "year" : {
16 | "type" : "integer"
17 | }
18 | }
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/_analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/_analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/products _analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/products _analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/products _analyze_field=book.description/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/products _analyze_field=book.description/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.3.7.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"mappings":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch","version":6,"master_node":"qO5ZTe0qSumxcnHDdCD5Zg","blocks":{},"nodes":{"qO5ZTe0qSumxcnHDdCD5Zg":{"name":"Margo Damian","transport_address":"inet[/10.1.1.4:9300]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"creation_date":"1422703063775","uuid":"Joz_yJnuSGqbxX6HINJcXA","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1040099"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"qO5ZTe0qSumxcnHDdCD5Zg","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"qO5ZTe0qSumxcnHDdCD5Zg":[{"state":"STARTED","primary":true,"node":"qO5ZTe0qSumxcnHDdCD5Zg","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "products" : {
3 | "mappings" : {
4 | "book" : {
5 | "properties" : {
6 | "description" : {
7 | "type" : "string"
8 | },
9 | "id" : {
10 | "type" : "integer"
11 | },
12 | "title" : {
13 | "type" : "string"
14 | },
15 | "year" : {
16 | "type" : "integer"
17 | }
18 | }
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/_analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/_analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/products _analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/products _analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/products _analyze_field=book.description/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/products _analyze_field=book.description/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.0.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"mappings":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_4_2","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_4_2","version":4,"master_node":"8hW-DSO7Qem_VbDKr3_zaQ","blocks":{},"nodes":{"8hW-DSO7Qem_VbDKr3_zaQ":{"name":"Fin Fang Foom","transport_address":"inet[/10.1.1.4:8142]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"creation_date":"1422702857756","uuid":"iCBrOzEARUCLUeVWZrDpVw","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1040299"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"8hW-DSO7Qem_VbDKr3_zaQ","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"8hW-DSO7Qem_VbDKr3_zaQ":[{"state":"STARTED","primary":true,"node":"8hW-DSO7Qem_VbDKr3_zaQ","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "products" : {
3 | "mappings" : {
4 | "book" : {
5 | "properties" : {
6 | "description" : {
7 | "type" : "string"
8 | },
9 | "id" : {
10 | "type" : "integer"
11 | },
12 | "title" : {
13 | "type" : "string"
14 | },
15 | "year" : {
16 | "type" : "integer"
17 | }
18 | }
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/_analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/_analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/products _analyze_analyzer=standard/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/products _analyze_analyzer=standard/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/products _analyze_field=book.description/POST/body 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | wlazl kotek na plotek i mruuu-czy
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/products _analyze_field=book.description/POST/result 9348C3CA3F983A5D66F1176E09EEF2B39B3A6BB1.json:
--------------------------------------------------------------------------------
1 | {"tokens":[{"token":"wlazl","start_offset":0,"end_offset":5,"type":"","position":1},{"token":"kotek","start_offset":6,"end_offset":11,"type":"","position":2},{"token":"na","start_offset":12,"end_offset":14,"type":"","position":3},{"token":"plotek","start_offset":15,"end_offset":21,"type":"","position":4},{"token":"i","start_offset":22,"end_offset":23,"type":"","position":5},{"token":"mruuu","start_offset":24,"end_offset":29,"type":"","position":6},{"token":"czy","start_offset":30,"end_offset":33,"type":"","position":7}]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/default/1.4.2.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"mappings":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/0.90.13.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_0_90_13","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/0.90.13.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_0_90_13","version":6,"master_node":"vDW1ILpITASwa_7Xh7nVbA","blocks":{},"nodes":{"vDW1ILpITASwa_7Xh7nVbA":{"name":"Volla","transport_address":"inet[/10.1.1.4:8913]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index.number_of_replicas":"0","index.number_of_shards":"1","index.version.created":"901399","index.uuid":"4unnImJ8TjqMCgBKh5FbdA"},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"vDW1ILpITASwa_7Xh7nVbA","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"vDW1ILpITASwa_7Xh7nVbA":[{"state":"STARTED","primary":true,"node":"vDW1ILpITASwa_7Xh7nVbA","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/0.90.13.0/ _nodes/GET/result.json:
--------------------------------------------------------------------------------
1 | {"ok":true,"cluster_name":"elasticsearch_0_90_13","nodes":{"vDW1ILpITASwa_7Xh7nVbA":{"name":"Volla","transport_address":"inet[/10.1.1.4:8913]","hostname":"caldeum","version":"0.90.13","http_address":"inet[/10.1.1.4:9913]"}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/0.90.13.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/0.90.13.0/_search/POST/result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/0.90.13.0/_stats/GET/result.json:
--------------------------------------------------------------------------------
1 | {"ok":true,"_shards":{"total":0,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.0.3.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_0_3","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.0.3.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_0_3","version":7,"master_node":"jOq254KPSjyPO9TAHXt3Vg","blocks":{},"nodes":{"jOq254KPSjyPO9TAHXt3Vg":{"name":"Thirty-Three","transport_address":"inet[/10.1.1.4:8103]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"ZNnomGvhSDigVDneAqZX-Q","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1000399"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"jOq254KPSjyPO9TAHXt3Vg","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"jOq254KPSjyPO9TAHXt3Vg":[{"state":"STARTED","primary":true,"node":"jOq254KPSjyPO9TAHXt3Vg","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.0.3.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.0.3.0/_search/POST/result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.0.3.0/_stats/GET/result.json:
--------------------------------------------------------------------------------
1 | {"_shards":{"total":0,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.1.2.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_1_2","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.1.2.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_1_2","version":7,"master_node":"-UZoFS-7RTO2vTGMxEEAJg","blocks":{},"nodes":{"-UZoFS-7RTO2vTGMxEEAJg":{"name":"Talisman","transport_address":"inet[/10.1.1.4:8112]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"Laoe5-xdSuq0aU7kXRkwBg","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1010299"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"-UZoFS-7RTO2vTGMxEEAJg","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"-UZoFS-7RTO2vTGMxEEAJg":[{"state":"STARTED","primary":true,"node":"-UZoFS-7RTO2vTGMxEEAJg","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.1.2.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.1.2.0/_search/POST/result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.1.2.0/_stats/GET/result.json:
--------------------------------------------------------------------------------
1 | {"_shards":{"total":0,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.2.4.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_2_4","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.2.4.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_2_4","version":7,"master_node":"c3Zw5rtvQQqlCoMBcNV2Ig","blocks":{},"nodes":{"c3Zw5rtvQQqlCoMBcNV2Ig":{"name":"Eugene Judd","transport_address":"inet[/10.1.1.4:8124]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"fauGC-OiTm-RplqB4-Xzmg","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1020499"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"c3Zw5rtvQQqlCoMBcNV2Ig","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"c3Zw5rtvQQqlCoMBcNV2Ig":[{"state":"STARTED","primary":true,"node":"c3Zw5rtvQQqlCoMBcNV2Ig","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.2.4.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.2.4.0/_search/POST/result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.2.4.0/_stats/GET/result.json:
--------------------------------------------------------------------------------
1 | {"_shards":{"total":0,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.3.7.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_3_7","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.3.7.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_3_7","version":6,"master_node":"-cDY8XAoT3G8CZ1jM2mt2Q","blocks":{},"nodes":{"-cDY8XAoT3G8CZ1jM2mt2Q":{"name":"Stunner","transport_address":"inet[/10.1.1.4:8137]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"uuid":"WpKE1zzwTiixkJezWUq35w","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1030799"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"-cDY8XAoT3G8CZ1jM2mt2Q","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"-cDY8XAoT3G8CZ1jM2mt2Q":[{"state":"STARTED","primary":true,"node":"-cDY8XAoT3G8CZ1jM2mt2Q","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.3.7.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.3.7.0/_search/POST/result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"took":1,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.3.7.0/_stats/GET/result.json:
--------------------------------------------------------------------------------
1 | {"_shards":{"total":0,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.0.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.0.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch","version":6,"master_node":"qO5ZTe0qSumxcnHDdCD5Zg","blocks":{},"nodes":{"qO5ZTe0qSumxcnHDdCD5Zg":{"name":"Margo Damian","transport_address":"inet[/10.1.1.4:9300]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"creation_date":"1422703063775","uuid":"Joz_yJnuSGqbxX6HINJcXA","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1040099"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"qO5ZTe0qSumxcnHDdCD5Zg","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"qO5ZTe0qSumxcnHDdCD5Zg":[{"state":"STARTED","primary":true,"node":"qO5ZTe0qSumxcnHDdCD5Zg","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.0.0/ products book _mapping_pretty/GET/result.json:
--------------------------------------------------------------------------------
1 | {
2 | "products" : {
3 | "mappings" : {
4 | "book" : {
5 | "properties" : {
6 | "description" : {
7 | "type" : "string"
8 | },
9 | "id" : {
10 | "type" : "integer"
11 | },
12 | "title" : {
13 | "type" : "string"
14 | },
15 | "year" : {
16 | "type" : "integer"
17 | }
18 | }
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.0.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.0.0/_search/POST/result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"took":1,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.0.0/_stats/GET/result.json:
--------------------------------------------------------------------------------
1 | {"_shards":{"total":0,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.0.0/products _mapping/GET/result.json:
--------------------------------------------------------------------------------
1 | {"products":{"mappings":{"cd":{"properties":{"artist":{"type":"string"},"genere":{"type":"string"},"id":{"type":"integer"},"releaseDate":{"type":"date","format":"dateOptionalTime"},"title":{"type":"string"}}},"book":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"title":{"type":"string"},"year":{"type":"integer"}}}}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.2.0/ _cluster health/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_4_2","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.2.0/ _cluster state/GET/result.json:
--------------------------------------------------------------------------------
1 | {"cluster_name":"elasticsearch_1_4_2","version":4,"master_node":"8hW-DSO7Qem_VbDKr3_zaQ","blocks":{},"nodes":{"8hW-DSO7Qem_VbDKr3_zaQ":{"name":"Fin Fang Foom","transport_address":"inet[/10.1.1.4:8142]","attributes":{}}},"metadata":{"templates":{},"indices":{"products":{"state":"open","settings":{"index":{"creation_date":"1422702857756","uuid":"iCBrOzEARUCLUeVWZrDpVw","number_of_replicas":"0","number_of_shards":"1","version":{"created":"1040299"}}},"mappings":{"cd":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"releaseDate":{"format":"dateOptionalTime","type":"date"},"genere":{"type":"string"},"artist":{"type":"string"}}},"book":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"year":{"type":"integer"}}}},"aliases":[]}}},"routing_table":{"indices":{"products":{"shards":{"0":[{"state":"STARTED","primary":true,"node":"8hW-DSO7Qem_VbDKr3_zaQ","relocating_node":null,"shard":0,"index":"products"}]}}}},"routing_nodes":{"unassigned":[],"nodes":{"8hW-DSO7Qem_VbDKr3_zaQ":[{"state":"STARTED","primary":true,"node":"8hW-DSO7Qem_VbDKr3_zaQ","relocating_node":null,"shard":0,"index":"products"}]}},"allocations":[]}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.2.0/_search/POST/body 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"query": {"match_all": {}}, "facets": { "types": { "terms": { "field": "_type", "size": 100 }}}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.2.0/_search/POST/result 47D3402BA2A276291998EA335B4145C59E9C8DC0.json:
--------------------------------------------------------------------------------
1 | {"took":1,"timed_out":false,"_shards":{"total":0,"successful":0,"failed":0},"hits":{"total":0,"max_score":0.0,"hits":[]}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/data/empty/1.4.2.0/_stats/GET/result.json:
--------------------------------------------------------------------------------
1 | {"_shards":{"total":0,"successful":0,"failed":0},"_all":{"primaries":{},"total":{}},"indices":{}}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Commands
2 |
3 | []
4 |
5 |
6 | do()
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/Attributes.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Commands
2 |
3 | open System
4 |
5 | type ESVersionAttribute (major : int, minor : int, patch : int, build : int) =
6 | inherit Attribute()
7 | new (major : int) = ESVersionAttribute(major,0,0,0)
8 | new (major : int, minor : int) = ESVersionAttribute(major,minor,0,0)
9 | new (major : int, minor : int, patch : int) = ESVersionAttribute(major,minor,patch,0)
10 |
11 | member x.major = major
12 | member x.minor = minor
13 | member x.patch = patch
14 | member x.build = build
15 |
16 | member x.ToVersion() =
17 | new ElasticOps.Commands.Version(major,minor,patch,build)
18 |
19 | member x.ToTuple() =
20 | (major,minor,patch,build)
21 |
22 | []
23 | type ESVersionFrom (major : int, minor : int, patch : int, build : int) =
24 | inherit ESVersionAttribute(major, minor,patch, build)
25 | new (major : int) = ESVersionFrom(major,0,0,0)
26 | new (major : int, minor : int) = ESVersionFrom(major,minor,0,0)
27 | new (major : int, minor : int, patch : int) = ESVersionFrom(major,minor,patch,0)
28 |
29 |
30 |
31 |
32 | []
33 | type ESVersionTo (major : int, minor : int, patch : int, build : int) =
34 | inherit ESVersionAttribute(major, minor,patch, build)
35 | new (major : int) = ESVersionTo(major,0,0,0)
36 | new (major : int, minor : int) = ESVersionTo(major,minor,0,0)
37 | new (major : int, minor : int, patch : int) = ESVersionTo(major,minor,patch,0)
38 |
39 | type CommandsHandlers() =
40 | inherit Attribute()
41 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/CList.fs:
--------------------------------------------------------------------------------
1 | []
2 | module ElasticOps.Commands.CList
3 |
4 | open System.Linq
5 |
6 | let ofSeq (seq : seq<_>)=
7 | seq.ToList()
8 |
9 | let ofList (list : _ list ) =
10 | list.ToList()
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/Command.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Commands
2 |
3 | type Command<'T>(connection : Connection) =
4 | new (connection) = Command<'T>(connection)
5 | member x.Connection = connection
6 | member x.ClusterUri = match x.Connection with
7 | | null -> null
8 | | _ -> x.Connection.ClusterUri
9 |
10 | member x.Version = x.Connection.Version
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/CommandResult.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Commands
2 |
3 | open System
4 |
5 | type CommandResult<'T when 'T : null> (result : 'T, success : Boolean, errorMessage : String, ex : Exception) =
6 | member x.Result = result
7 | member x.Success = success
8 | member x.ErrorMessage = errorMessage
9 | member x.Exception = ex
10 | member x.Failed
11 | with get() = not x.Success
12 |
13 | new (result : 'T) = CommandResult(result,true,null,null)
14 | new (errorMessage : string ) = CommandResult(null,false,errorMessage,null)
15 | new (errorMessage : string, ex : Exception) = CommandResult(null,false,errorMessage,ex)
16 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/DataView.fs:
--------------------------------------------------------------------------------
1 | []
2 | module ElasticOps.Commands.DataView
3 |
4 | open ElasticOps.Commands
5 | open System.Collections.Generic
6 | open FSharp.Data
7 | open FSharp.Data.JsonExtensions
8 |
9 | type Page = { Hits: int; Documents : IEnumerable}
10 |
11 | type PageCommand(connection : Connection, index : string, typeName : string, pageSize : System.Int64, page : System.Int64 ) =
12 | inherit Command(connection)
13 | member val Index = index with get,set
14 | member val Type = typeName with get,set
15 | member val PageSize = pageSize with get,set
16 | member val Page = page with get,set
17 |
18 | let page (command : PageCommand) =
19 | let query = @"{{
20 | ""from"": {0},
21 | ""size"": {1},
22 | ""query"": {{
23 | ""match_all"": {{}}
24 | }}
25 | }}"
26 | let res = POST command.Connection (command.Index+"/"+command.Type+"/_search") (System.String.Format(query, (command.PageSize*(command.Page-1L)), command.PageSize))
27 | |> JsonValue.Parse
28 |
29 | let hits = res?hits?total.AsInteger()
30 |
31 | let docs = res?hits?hits.AsArray()
32 | |> List.ofArray
33 | |> List.map (fun x -> x?_source)
34 | |> CList.ofList
35 |
36 | {Hits = hits; Documents = docs}
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/ElasticOps.Com.v2.ncrunchproject:
--------------------------------------------------------------------------------
1 |
2 | 1000
3 | false
4 | false
5 | false
6 | true
7 | false
8 | false
9 | false
10 | false
11 | false
12 | true
13 | true
14 | false
15 | true
16 | true
17 | true
18 | 60000
19 |
20 |
21 |
22 | AutoDetect
23 | STA
24 | x86
25 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/HeartBeat.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Commands
2 |
3 | []
4 | type HeartBeat( isAlive : bool , version : string ) =
5 | member val IsAlive = isAlive with get,set
6 | member val Version = version with get,set
7 |
8 | new(isAlive : bool) = HeartBeat(isAlive,null)
9 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/Index.fs:
--------------------------------------------------------------------------------
1 | []
2 | module ElasticOps.Commands.Index
3 |
4 | open ElasticOps.Commands
5 |
6 | type CloseCommand(connection : Connection, index : string) =
7 | inherit Command(connection)
8 | member val Index = index with get,set
9 |
10 | type OpenCommand(connection : Connection, index : string) =
11 | inherit Command(connection)
12 | member val Index = index with get,set
13 |
14 |
15 | type FlushCommand(connection : Connection, index : string) =
16 | inherit Command(connection)
17 | member val Index = index with get,set
18 |
19 |
20 | type RefreshCommand(connection : Connection, index : string) =
21 | inherit Command(connection)
22 | member val Index = index with get,set
23 |
24 |
25 | type OptimizeCommand(connection : Connection, index : string) =
26 | inherit Command(connection)
27 | member val Index = index with get,set
28 |
29 |
30 | type DeleteCommand(connection : Connection, index : string) =
31 | inherit Command(connection)
32 | member val Index = index with get,set
33 |
34 |
35 | type ClearCacheCommand(connection : Connection, index : string) =
36 | inherit Command(connection)
37 | member val Index = index with get,set
38 |
39 | let close (command : CloseCommand) =
40 | POST command.Connection (command.Index + "/_close") ""
41 |
42 |
43 | let flush (command : FlushCommand) =
44 | POST command.Connection (command.Index + "/_flush") ""
45 |
46 |
47 | let ``open`` (command : OpenCommand) =
48 | POST command.Connection (command.Index + "/_open") ""
49 |
50 |
51 | let delete (command : DeleteCommand) =
52 | DELETE command.Connection command.Index
53 |
54 |
55 | let clearCache (command : ClearCacheCommand) =
56 | POST command.Connection (command.Index + "/_cache/clear") ""
57 |
58 |
59 | let optimize (command : OptimizeCommand) =
60 | POST command.Connection (command.Index + "/_optimize") ""
61 |
62 | let refresh (command : RefreshCommand) =
63 | POST command.Connection (command.Index + "/_refresh") ""
64 |
65 |
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/Utils.fs:
--------------------------------------------------------------------------------
1 | []
2 | module ElasticOps.Commands.Utils
3 | open FSharp.Data
4 | open FSharp.Data.JsonExtensions
5 | open FSharp.Data.Runtime
6 | open Humanizer
7 | open System.Collections.Generic
8 |
9 | let asPropertyList (jsonValue : JsonValue) =
10 | jsonValue.Properties
11 |
12 |
13 | let asPropertyListOfScalars (jsonValue : JsonValue) =
14 | jsonValue.Properties
15 | |> Seq.filter (fun p -> match JsonConversions.AsString false null (snd p) with
16 | | Some _ -> true
17 | | _ -> false)
18 |
19 | let humanizeKeys (pair : (string * JsonValue)) =
20 | ((fst pair).Humanize(LetterCasing.Sentence), (snd pair))
21 |
22 | let extractStringsFromValues (pair : (string * JsonValue)) =
23 | ((fst pair),(snd pair).AsString())
24 |
25 | let asKeyValuePairList (propSeq : (string * JsonValue) seq) =
26 | propSeq |> Seq.map humanizeKeys
27 | |> Seq.map (fun pair -> new KeyValuePair((fst pair),(snd pair).AsString()))
28 | |> List.ofSeq
--------------------------------------------------------------------------------
/src/ElasticOps.Commands/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/ElasticOps.Configuration/ElasticOpsConfig.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Configuration
2 | open FSharp.Configuration
3 |
4 |
5 | type ElasticOpsConfig = YamlConfig<"..\SolutionItems\Config.yaml">
6 |
7 |
8 | type IntellisenseConfig = YamlConfig<"..\SolutionItems\IntellisenseConfig.yaml">
9 |
10 | module ConfigLoaders =
11 | let LoadIntellisenseConfig () =
12 | let config = new IntellisenseConfig()
13 | config.Load("Config\\IntellisenseConfig.yaml")
14 | config
15 |
16 | let LoadElasticOpsConfig () =
17 | let config = new ElasticOpsConfig()
18 | config.Load("Config\\Config.yaml")
19 | config
--------------------------------------------------------------------------------
/src/ElasticOps.Configuration/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense.Tests/IntellisenseEngineTests.fs:
--------------------------------------------------------------------------------
1 | module IntellisenseEngineTests
2 |
3 | open NUnit.Framework
4 | open ElasticOps.Intellisense
5 |
6 | let ``all completion macros are supported`` fileName =
7 | let rulesFiles = System.IO.File.ReadAllText(fileName)
8 | let macros = System.Text.RegularExpressions.Regex.Matches(rulesFiles,"\|[a-z|A-Z|0-9|_]*\|")
9 | let mutable shouldFail = false
10 | for m in macros do
11 | try
12 | IntellisenseEngine.PostfixFromCompletionMode m.Value |> ignore
13 | with
14 | | _ ->
15 | System.Console.WriteLine(m)
16 | shouldFail <- true
17 |
18 | if shouldFail then Assert.Fail() else ()
19 |
20 | []
21 | let ``all completion macros are supported for _search endpoint`` () =
22 | ``all completion macros are supported`` "IntellisenseRules_search.json"
23 |
24 |
25 | []
26 | let ``all completion macros are supported for _mapping endpoint`` () =
27 | ``all completion macros are supported`` "IntellisenseRules_mapping.json"
28 |
29 |
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense.Tests/Library1.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Intellisense.Tests
2 |
3 | type Class1() =
4 | member this.X = "F#"
5 |
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense/Intellisense.fsi:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Intellisense
2 | module IntellisenseEngine = begin
3 |
4 | val TrySuggest : text:string -> caretLine:int -> caretColumn:int -> endpoint:string -> (Context * Suggestion list option)
5 | val Complete : context:Context -> suggestion:Suggestion -> Context
6 | val PostfixFromCompletionMode : string -> string * string
7 |
8 | end
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense/String.fs:
--------------------------------------------------------------------------------
1 | []
2 | module Microsoft.FSharp.Core.String
3 |
4 | open System
5 |
6 | let split (splitStr : string) (str : string) =
7 | str.Split([|splitStr|],StringSplitOptions.None)
8 |
9 | let substring (str : string) (line : int) col =
10 | let allLines = str |> (split "\r\n") |> List.ofArray
11 |
12 | match (allLines,line) with
13 | | (l::[],_) -> str.Substring(0,col-1)
14 | | (lines,1) -> str.Substring(0,col-1)
15 | | (lines,_) -> let leadingLines = lines|> Seq.ofList |> Seq.take (line - 1) |> List.ofSeq
16 | let lastLine = (Seq.nth (line - 1) lines).Substring(0,col-1)
17 | (leadingLines |> String.concat "\r\n")+"\r\n"+lastLine
18 |
19 |
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense/Structures.fs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Intellisense
2 |
3 | open ElasticOps.Parsing
4 | open ElasticOps.Parsing.Processing
5 | open Microsoft.FSharp.Core
6 |
7 | type Mode =
8 | | Property of string
9 | | Value
10 | | Snippet
11 |
12 | type Suggestion =
13 | {
14 | Text : string;
15 | Mode : Mode;
16 | }
17 |
18 | type Context =
19 | {
20 | OriginalCode : string;
21 | CodeTillCaret : string;
22 | CodeFromCaret : string;
23 | ParseTree : JsonValue option;
24 | OriginalCaretPosition : int * int;
25 | NewCaretPosition : int * int;
26 | NewText : string
27 | }
28 | static member create json caretLine caretColumn=
29 | let codeTillCaret = String.substring json caretLine caretColumn
30 | let tree = parse codeTillCaret
31 |
32 | {
33 | OriginalCode = json;
34 | OriginalCaretPosition = (caretLine,caretColumn);
35 | CodeFromCaret = null;
36 | CodeTillCaret = codeTillCaret;
37 | ParseTree = tree;
38 | NewCaretPosition = (caretLine, caretColumn) ;
39 | NewText = null;
40 | }
41 |
42 | type RuleSign =
43 | | UnfinishedPropertyName
44 | | Property of string
45 | | AnyProperty
46 | | AnyPath
47 | | OneOf of string list
48 |
49 | type Rule = { Sign : RuleSign list ; Suggestions : Suggestion list}
50 |
--------------------------------------------------------------------------------
/src/ElasticOps.Intellisense/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing/.gitignore:
--------------------------------------------------------------------------------
1 | Lexer.fs
2 | Parser.fs
3 | Parser.fsi
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing/IntellisenseLexer.fsl:
--------------------------------------------------------------------------------
1 | {
2 |
3 | module ElasticOps.Parsing.IntellisenseLexer
4 |
5 | open Microsoft.FSharp.Text.Lexing
6 | open ElasticOps.Parsing
7 | open System
8 | open IntellisenseParser
9 |
10 | exception SyntaxError of string
11 |
12 | let lexeme = LexBuffer.LexemeString
13 |
14 | let newline (lexbuf: LexBuffer<_>) =
15 | lexbuf.StartPos <- lexbuf.StartPos.NextLine
16 |
17 | }
18 |
19 | let white = [' ' '\t']+
20 | let newline = '\r' | '\n' | "\r\n"
21 | let id = ['a'-'z' 'A'-'Z' '0'-'9' '_']*
22 | let completionMacro = '|' id '|'
23 |
24 | rule read =
25 | parse
26 | | white { read lexbuf }
27 | | newline { newline lexbuf; read lexbuf }
28 | | '"' { read_string "" false lexbuf }
29 | | '{' { LEFT_BRACE }
30 | | '}' { RIGHT_BRACE }
31 | | '[' { LEFT_BRACK }
32 | | ']' { RIGHT_BRACK }
33 | | '(' { LEFT_PARENTHESIS }
34 | | ')' { RIGHT_PARENTHESIS }
35 | | ':' { COLON }
36 | | ',' { COMMA }
37 | | "AnyProperty" {ANY_PROPERTY}
38 | | "AnyPath" {ANY_PATH}
39 | | "OneOf" {ONE_OF}
40 | | completionMacro {COMPLETION_MACRO (lexeme lexbuf)}
41 | | id { ID(lexeme lexbuf) }
42 | | eof { EOF }
43 | | _ { raise (Exception (sprintf "SyntaxError: Unexpected char: '%s' Line: %d Column: %d" (lexeme lexbuf) (lexbuf.StartPos.Line+1) lexbuf.StartPos.Column)) }
44 |
45 |
46 | and read_string str ignorequote =
47 | parse
48 | | '"' { if ignorequote then (read_string (str+"\\\"") false lexbuf) else STRING (str)}
49 | | '\\' { read_string str true lexbuf}
50 | | [^ '"' '\\']+ { read_string (str+(lexeme lexbuf)) false lexbuf}
51 | | eof { raise (new Exception("Unterminated string.")) }
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing/IntellisenseParser.fsi:
--------------------------------------------------------------------------------
1 | // Signature file for parser generated by fsyacc
2 | module ElasticOps.Parsing.IntellisenseParser
3 | type token =
4 | | EOF
5 | | ONE_OF
6 | | RIGHT_PARENTHESIS
7 | | LEFT_PARENTHESIS
8 | | ANY_PATH
9 | | ANY_PROPERTY
10 | | UNFINISHED_VALUE of (string * ElasticOps.Parsing.JsonValueType)
11 | | COMPLETION_MACRO of (string)
12 | | COMMA
13 | | COLON
14 | | RIGHT_BRACK
15 | | LEFT_BRACK
16 | | RIGHT_BRACE
17 | | LEFT_BRACE
18 | | STRING of (string)
19 | | ID of (string)
20 | type tokenId =
21 | | TOKEN_EOF
22 | | TOKEN_ONE_OF
23 | | TOKEN_RIGHT_PARENTHESIS
24 | | TOKEN_LEFT_PARENTHESIS
25 | | TOKEN_ANY_PATH
26 | | TOKEN_ANY_PROPERTY
27 | | TOKEN_UNFINISHED_VALUE
28 | | TOKEN_COMPLETION_MACRO
29 | | TOKEN_COMMA
30 | | TOKEN_COLON
31 | | TOKEN_RIGHT_BRACK
32 | | TOKEN_LEFT_BRACK
33 | | TOKEN_RIGHT_BRACE
34 | | TOKEN_LEFT_BRACE
35 | | TOKEN_STRING
36 | | TOKEN_ID
37 | | TOKEN_end_of_input
38 | | TOKEN_error
39 | type nonTerminalId =
40 | | NONTERM__startstart
41 | | NONTERM_start
42 | | NONTERM_prog
43 | | NONTERM_value
44 | | NONTERM_object_fields
45 | | NONTERM_rev_object_fields
46 | | NONTERM_one_of_values
47 | | NONTERM_rev_one_of_values
48 | /// This function maps integers indexes to symbolic token ids
49 | val tagOfToken: token -> int
50 |
51 | /// This function maps integers indexes to symbolic token ids
52 | val tokenTagToTokenId: int -> tokenId
53 |
54 | /// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production
55 | val prodIdxToNonTerminal: int -> nonTerminalId
56 |
57 | /// This function gets the name of a token as a string
58 | val token_to_string: token -> string
59 | val start : (Microsoft.FSharp.Text.Lexing.LexBuffer<'cty> -> token) -> Microsoft.FSharp.Text.Lexing.LexBuffer<'cty> -> (ElasticOps.Parsing.IntellisenseValue option)
60 |
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing/JsonLexer.fsl:
--------------------------------------------------------------------------------
1 | {
2 |
3 | module ElasticOps.Parsing.JsonLexer
4 |
5 | open Microsoft.FSharp.Text.Lexing
6 | open ElasticOps.Parsing
7 | open System
8 | open ElasticOps.Parsing.JsonParser
9 |
10 | exception SyntaxError of string
11 |
12 | let lexeme = LexBuffer.LexemeString
13 |
14 | let newline (lexbuf: LexBuffer<_>) =
15 | lexbuf.StartPos <- lexbuf.StartPos.NextLine
16 |
17 | }
18 |
19 | let int = ['-' '+']? ['0'-'9']+
20 | let digit = ['0'-'9']
21 | let frac = '.' digit+
22 | let exp = ['e' 'E'] ['-' '+']? digit+
23 | let float = ['-' '+']? digit+ frac? exp?
24 |
25 | let white = [' ' '\t']+
26 | let newline = '\r' | '\n' | "\r\n"
27 | let id = ['a'-'z' 'A'-'Z' '_'] ['a'-'z' 'A'-'Z' '0'-'9' '_']*
28 | let u_true = 't' | "tr" | "tru"
29 | let u_false = 'f' | "fa" | "fal" | "fals"
30 | let u_int = '-' | '+'
31 | let u_float = ['-' '+']? digit+ '.' digit* ['e' 'E']? ['+' '-']? digit*
32 | let u_null = 'n' | "nu" | "nul"
33 |
34 | rule read =
35 | parse
36 | | white { read lexbuf }
37 | | newline { newline lexbuf; read lexbuf }
38 | | int { INT (Int32.Parse(lexeme lexbuf)) }
39 | | u_int { UNFINISHED_VALUE(lexeme lexbuf, TInt) }
40 | | float { FLOAT (float (lexeme lexbuf)) }
41 | | u_float { UNFINISHED_VALUE(lexeme lexbuf, TFloat) }
42 | | "true" { TRUE }
43 | | "false" { FALSE }
44 | | u_true { UNFINISHED_VALUE(lexeme lexbuf, TBool) }
45 | | u_false { UNFINISHED_VALUE(lexeme lexbuf, TBool) }
46 | | "null" { NULL }
47 | | u_null { UNFINISHED_VALUE(lexeme lexbuf, TNull) }
48 | | '"' { read_string "" false lexbuf }
49 | | '{' { LEFT_BRACE }
50 | | '}' { RIGHT_BRACE }
51 | | '[' { LEFT_BRACK }
52 | | ']' { RIGHT_BRACK }
53 | | ':' { COLON }
54 | | ',' { COMMA }
55 | | eof { EOF }
56 | | _ { raise (Exception (sprintf "SyntaxError: Unexpected char: '%s' Line: %d Column: %d" (lexeme lexbuf) (lexbuf.StartPos.Line+1) lexbuf.StartPos.Column)) }
57 |
58 |
59 | and read_string str ignorequote =
60 | parse
61 | | '"' { if ignorequote then (read_string (str+"\\\"") false lexbuf) else STRING (str)}
62 | | '\\' { read_string str true lexbuf}
63 | | [^ '"' '\\']+ { read_string (str+(lexeme lexbuf)) false lexbuf}
64 | | eof { UNTERMINATED_STRING str }
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing/JsonParser.fsi:
--------------------------------------------------------------------------------
1 | // Signature file for parser generated by fsyacc
2 | module ElasticOps.Parsing.JsonParser
3 | type token =
4 | | EOF
5 | | UNFINISHED_VALUE of (string * ElasticOps.Parsing.JsonValueType)
6 | | COMMA
7 | | COLON
8 | | RIGHT_BRACK
9 | | LEFT_BRACK
10 | | RIGHT_BRACE
11 | | LEFT_BRACE
12 | | NULL
13 | | FALSE
14 | | TRUE
15 | | UNTERMINATED_STRING of (string)
16 | | STRING of (string)
17 | | ID of (string)
18 | | FLOAT of (float)
19 | | INT of (int)
20 | type tokenId =
21 | | TOKEN_EOF
22 | | TOKEN_UNFINISHED_VALUE
23 | | TOKEN_COMMA
24 | | TOKEN_COLON
25 | | TOKEN_RIGHT_BRACK
26 | | TOKEN_LEFT_BRACK
27 | | TOKEN_RIGHT_BRACE
28 | | TOKEN_LEFT_BRACE
29 | | TOKEN_NULL
30 | | TOKEN_FALSE
31 | | TOKEN_TRUE
32 | | TOKEN_UNTERMINATED_STRING
33 | | TOKEN_STRING
34 | | TOKEN_ID
35 | | TOKEN_FLOAT
36 | | TOKEN_INT
37 | | TOKEN_end_of_input
38 | | TOKEN_error
39 | type nonTerminalId =
40 | | NONTERM__startstart
41 | | NONTERM_start
42 | | NONTERM_prog
43 | | NONTERM_value
44 | | NONTERM_object_fields
45 | | NONTERM_rev_object_fields
46 | | NONTERM_array_values
47 | | NONTERM_rev_values
48 | /// This function maps integers indexes to symbolic token ids
49 | val tagOfToken: token -> int
50 |
51 | /// This function maps integers indexes to symbolic token ids
52 | val tokenTagToTokenId: int -> tokenId
53 |
54 | /// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production
55 | val prodIdxToNonTerminal: int -> nonTerminalId
56 |
57 | /// This function gets the name of a token as a string
58 | val token_to_string: token -> string
59 | val start : (Microsoft.FSharp.Text.Lexing.LexBuffer<'cty> -> token) -> Microsoft.FSharp.Text.Lexing.LexBuffer<'cty> -> (ElasticOps.Parsing.JsonValue option)
60 |
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/ElasticOps.Parsing/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/ElasticOps.TestData/Analyzer.json:
--------------------------------------------------------------------------------
1 | {
2 | "settings": {
3 | "analysis": {
4 | "char_filter": {
5 | "&_to_and": {
6 | "type": "mapping",
7 | "mappings": [ "&=> and " ]
8 | }
9 | },
10 | "filter": {
11 | "my_stopwords": {
12 | "type": "stop",
13 | "stopwords": [ "the", "a" ]
14 | }
15 | },
16 | "analyzer": {
17 | "my_analyzer": {
18 | "type": "custom",
19 | "char_filter": [ "html_strip", "&_to_and" ],
20 | "tokenizer": "standard",
21 | "filter": [ "lowercase", "my_stopwords" ]
22 | }
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/ElasticOps.TestData/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/ElasticOps.TestData/Book.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.TestData
2 | {
3 | public class Book
4 | {
5 | public int Id { get; set; }
6 | public string Title { get; set; }
7 | public int Year { get; set; }
8 | public string Description { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/ElasticOps.TestData/CD.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ElasticOps.TestData
4 | {
5 | public class CD
6 | {
7 | public int Id { get; set; }
8 | public string Title { get; set; }
9 | public string Genere { get; set; }
10 | public string Artist { get; set; }
11 | public DateTime ReleaseDate { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/ElasticOps.TestData/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 |
8 | [assembly: AssemblyTitle("ElasticOps.TestData")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ElasticOps.TestData")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 |
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 |
25 | [assembly: Guid("1dd9b206-a3a9-4b8d-b4b6-61e64856ca4c")]
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // [assembly: AssemblyVersion("1.0.*")]
37 |
38 | [assembly: AssemblyVersion("1.0.0.0")]
39 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/src/ElasticOps.TestData/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/ElasticOps.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 |
8 | [assembly: AssemblyTitle("ElasticOps.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ElasticOps.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 |
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 |
25 | [assembly: Guid("188ab763-7c34-4074-b0ed-dbfc2eca7bac")]
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // [assembly: AssemblyVersion("1.0.*")]
37 |
38 | [assembly: AssemblyVersion("1.0.0.0")]
39 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/src/ElasticOps.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/ElasticOps.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/ElasticOps.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | REST
--------------------------------------------------------------------------------
/src/ElasticOps/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/ElasticOps/Assets/SplashScreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/ElasticOps/Assets/SplashScreen.png
--------------------------------------------------------------------------------
/src/ElasticOps/Assets/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/ElasticOps/Assets/icon.ico
--------------------------------------------------------------------------------
/src/ElasticOps/Assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/ElasticOps/Assets/icon.png
--------------------------------------------------------------------------------
/src/ElasticOps/Attributes/PriorityAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ElasticOps.Attributes
4 | {
5 | [AttributeUsage(AttributeTargets.All)]
6 | public sealed class PriorityAttribute : Attribute
7 | {
8 | public int Priority { get; private set; }
9 |
10 | public PriorityAttribute(int priority)
11 | {
12 | Priority = priority;
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Behaviors/Autocomplete/AutocompleteItem.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Behaviors.AutoComplete
2 | {
3 | public class AutoCompleteItem
4 | {
5 | public AutoCompleteItem(string label, AutoCompleteMode mode)
6 | {
7 | Label = label;
8 | Mode = mode;
9 | }
10 |
11 | public string Label { get; set; }
12 |
13 | public AutoCompleteMode Mode { get; set; }
14 |
15 | public override string ToString()
16 | {
17 | return Label;
18 | }
19 |
20 | }
21 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Behaviors/Autocomplete/AutocompleteMode.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Behaviors.AutoComplete
2 | {
3 | public enum AutoCompleteMode
4 | {
5 | Index,
6 | Type,
7 | Endpoint
8 | }
9 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Behaviors/Autocomplete/IndexAutocompleteCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using System.Linq;
3 | using ElasticOps.Extensions;
4 | using ElasticOps.Services;
5 |
6 | namespace ElasticOps.Behaviors.AutoComplete
7 | {
8 | public class IndexAutoCompleteCollection : ObservableCollection
9 | {
10 | private readonly ClusterDataCache _clusterData;
11 |
12 | public IndexAutoCompleteCollection(ClusterDataCache clusterData)
13 | {
14 | _clusterData = clusterData;
15 | }
16 |
17 | public void UpdateSuggestions(string text)
18 | {
19 | if (this.Any(x => x.Label == text)) return;
20 |
21 | if (string.IsNullOrEmpty(text))
22 | {
23 | Clear();
24 | _clusterData.Indices.Select(x => new AutoCompleteItem(x, AutoCompleteMode.Index)).ForEach(Add);
25 | return;
26 | }
27 |
28 | text = text.Replace('\\', '/');
29 |
30 | if (text.StartsWithIgnoreCase("/"))
31 | text = text.Substring(1);
32 |
33 | Clear();
34 | _clusterData.Indices.Where(x => x.StartsWithIgnoreCase(text))
35 | .Select(x => new AutoCompleteItem(x, AutoCompleteMode.Index))
36 | .ForEach(Add);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Behaviors/CodeCompletionData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Media;
3 | using ElasticOps.Intellisense;
4 | using ICSharpCode.AvalonEdit;
5 | using ICSharpCode.AvalonEdit.CodeCompletion;
6 | using ICSharpCode.AvalonEdit.Document;
7 | using ICSharpCode.AvalonEdit.Editing;
8 |
9 | namespace ElasticOps.Behaviors
10 | {
11 | public class CodeCompletionData : ICompletionData
12 | {
13 | public CodeCompletionData(string text)
14 | {
15 | Text = text;
16 | Content = text;
17 | }
18 |
19 | public CodeCompletionData(Context context, Suggestion suggestion)
20 | {
21 | Ensure.ArgumentNotNull(suggestion,"suggestion");
22 |
23 | Suggestion = suggestion;
24 | Context = context;
25 | Text = suggestion.Text;
26 | Content = suggestion.Text;
27 | }
28 |
29 | public object Content { get; set; }
30 |
31 | public object Description { get; set; }
32 |
33 | public ImageSource Image { get; set; }
34 |
35 | public double Priority { get; set; }
36 |
37 | public string Text { get; set; }
38 |
39 | public Context Context { get; set; }
40 |
41 | public Suggestion Suggestion { get; set; }
42 |
43 | public void Complete(TextArea textArea, ISegment completionSegment, EventArgs insertionRequestEventArgs)
44 | {
45 | Ensure.ArgumentNotNull(textArea, "textArea");
46 |
47 | var result = IntellisenseEngine.Complete(Context, Suggestion);
48 |
49 | textArea.Document.Text = result.NewText;
50 | textArea.Caret.Position = new TextViewPosition(result.NewCaretPosition.Item1, result.NewCaretPosition.Item2);
51 | textArea.Caret.BringCaretToView();
52 | }
53 |
54 | public override string ToString()
55 | {
56 | return Text;
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Behaviors/IndexAutoCompleteBoxBehavior.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 | using System.Windows.Interactivity;
4 | using ElasticOps.Behaviors.AutoComplete;
5 |
6 | namespace ElasticOps.Behaviors
7 | {
8 | public class IndexAutoCompleteBoxBehavior : Behavior
9 | {
10 | private IndexAutoCompleteCollection _indexAutocompleteCollection;
11 |
12 | protected override void OnAttached()
13 | {
14 | AssociatedObject.ItemTemplate =
15 | Application.Current.FindResource("UrlAutoCompleteBoxItemTemplate") as DataTemplate;
16 | AssociatedObject.IsTextCompletionEnabled = true;
17 | AssociatedObject.MinimumPrefixLength = 0;
18 |
19 | _indexAutocompleteCollection = AppBootstrapper.GetInstance();
20 |
21 | AssociatedObject.ItemsSource = _indexAutocompleteCollection;
22 | AssociatedObject.TextChanged += AssociatedObject_TextChanged;
23 | }
24 |
25 | protected override void OnDetaching()
26 | {
27 | AssociatedObject.TextChanged -= AssociatedObject_TextChanged;
28 | base.OnDetaching();
29 | }
30 |
31 | private void AssociatedObject_TextChanged(object sender, RoutedEventArgs e)
32 | {
33 | _indexAutocompleteCollection.UpdateSuggestions(AssociatedObject.Text);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Behaviors/OnlyDigitsInTextBoxBehavior.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 | using System.Windows.Input;
3 | using System.Windows.Interactivity;
4 |
5 | namespace ElasticOps.Behaviors
6 | {
7 | public class OnlyDigitsInTextBoxBehavior : Behavior
8 | {
9 | protected override void OnAttached()
10 | {
11 | AssociatedObject.KeyDown += AssociatedObject_KeyDown;
12 |
13 | base.OnAttached();
14 | }
15 |
16 | private void AssociatedObject_KeyDown(object sender, KeyEventArgs e)
17 | {
18 | if (!char.IsDigit((char) KeyInterop.VirtualKeyFromKey(e.Key)))
19 | {
20 | e.Handled = true;
21 | }
22 | }
23 |
24 | protected override void OnDetaching()
25 | {
26 | AssociatedObject.KeyDown -= AssociatedObject_KeyDown;
27 |
28 | base.OnDetaching();
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Behaviors/UrlAutoCompleteBoxBehavior.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 | using System.Windows.Interactivity;
4 | using ElasticOps.Behaviors.AutoComplete;
5 |
6 | namespace ElasticOps.Behaviors
7 | {
8 | public class UrlAutoCompleteBoxBehavior : Behavior
9 | {
10 | private UrlAutoCompleteCollection _urlAutoCompleteCollection;
11 |
12 | protected override void OnAttached()
13 | {
14 | AssociatedObject.ItemTemplate =
15 | Application.Current.FindResource("UrlAutoCompleteBoxItemTemplate") as DataTemplate;
16 | _urlAutoCompleteCollection = AppBootstrapper.GetInstance();
17 | AssociatedObject.IsTextCompletionEnabled = true;
18 | AssociatedObject.MinimumPrefixLength = 0;
19 | AssociatedObject.ItemsSource = _urlAutoCompleteCollection;
20 |
21 | AssociatedObject.TextChanged += AssociatedObject_TextChanged;
22 | }
23 |
24 | protected override void OnDetaching()
25 | {
26 | AssociatedObject.TextChanged -= AssociatedObject_TextChanged;
27 | base.OnDetaching();
28 | }
29 |
30 | private void AssociatedObject_TextChanged(object sender, RoutedEventArgs e)
31 | {
32 | _urlAutoCompleteCollection.UpdateSuggestions(AssociatedObject.Text);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/ElasticOps/CodeAnalysisRules.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/ElasticOps/Converters/BoolToOppositeVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace ElasticOps.Converters
7 | {
8 | public class BoolToOppositeVisibilityConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | return !(bool) value ? Visibility.Visible : Visibility.Collapsed;
13 | }
14 |
15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | return null;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Converters/BoolToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace ElasticOps.Converters
7 | {
8 | public class BoolToVisibilityConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | return (bool) value ? Visibility.Visible : Visibility.Collapsed;
13 | }
14 |
15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | return null;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Converters/HumanizeBigNumbersConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using ElasticOps.Extensions;
5 |
6 | namespace ElasticOps.Converters
7 | {
8 | public class HumanizeBigNumbersConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | if (value is int)
13 | return ((int) value).Humanize();
14 | if (value is long)
15 | return ((long) value).Humanize();
16 |
17 | return string.Empty;
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21 | {
22 | return null;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/ElasticOps/DIModules/CaliburnMicroModule.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using Caliburn.Micro;
3 |
4 | namespace ElasticOps.DIModules
5 | {
6 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance","CA1812:AvoidUninstantiatedInternalClasses",Justification = "It's instantiated by DI container.")]
7 | internal class CaliburnMicroModule : Module
8 | {
9 | protected override void Load(ContainerBuilder builder)
10 | {
11 | builder.RegisterType().As();
12 | builder.RegisterType().As().SingleInstance();
13 |
14 | base.Load(builder);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/ElasticOps/DIModules/InfrastractureModel.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using ElasticOps.Behaviors.AutoComplete;
3 | using ElasticOps.Commands;
4 | using ElasticOps.Configuration;
5 | using ElasticOps.Services;
6 |
7 | namespace ElasticOps.DIModules
8 | {
9 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance","CA1812:AvoidUninstantiatedInternalClasses", Justification = "It's instantiated by DI container.")]
10 | internal class InfrastractureModel : Module
11 | {
12 | protected override void Load(ContainerBuilder builder)
13 | {
14 | builder.RegisterType().AsSelf();
15 | builder.RegisterType().AsSelf().SingleInstance();
16 | builder.RegisterType().AsSelf().SingleInstance();
17 | builder.RegisterType().AsSelf().SingleInstance();
18 | builder.RegisterType().AsSelf().SingleInstance();
19 | builder.RegisterType().AsSelf().SingleInstance();
20 |
21 | builder.Register(c =>
22 | {
23 | var config = ConfigLoaders.LoadElasticOpsConfig();
24 | return config;
25 | }).As().SingleInstance();
26 |
27 | builder.Register(c =>
28 | {
29 | var config = ConfigLoaders.LoadIntellisenseConfig();
30 | return config;
31 | }).As().SingleInstance();
32 |
33 | builder.RegisterType().AsSelf().SingleInstance();
34 |
35 | base.Load(builder);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/src/ElasticOps/DIModules/ViewsModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Reflection;
4 | using Autofac;
5 | using Caliburn.Micro;
6 | using ElasticOps.ViewModels.ManagementScreens;
7 | using Module = Autofac.Module;
8 |
9 | namespace ElasticOps.DIModules
10 | {
11 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "It's instantiated by DI container.")]
12 | internal class ViewsModule : Module
13 | {
14 | protected override void Load(ContainerBuilder builder)
15 | {
16 | builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())
17 | .Where(x => !x.IsAbstract && x.IsClass && x.GetInterface(typeof (IManagementScreen).Name) != null)
18 | .As();
19 |
20 | builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())
21 | .Where(x => x.IsClass && !x.IsAbstract && x.Name.EndsWith("ViewModel", StringComparison.Ordinal))
22 | .AsSelf().InstancePerDependency();
23 |
24 | builder.RegisterAssemblyTypes(AssemblySource.Instance.ToArray())
25 | .Where(type => type.Name.EndsWith("View", StringComparison.Ordinal))
26 | .AsSelf().InstancePerDependency();
27 |
28 | base.Load(builder);
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/ElasticOps/DependencyProperties/AutoCompleteBoxProperties.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 |
4 | namespace ElasticOps.DependencyProperties
5 | {
6 | public class AutoCompleteBoxProperties : DependencyObject
7 | {
8 | public static readonly DependencyProperty SelectedIndexProperty =
9 | DependencyProperty.RegisterAttached("SelectedIndex", typeof (string), typeof (AutoCompleteBox));
10 |
11 | public static bool GetSelectedIndex(DependencyObject obj)
12 | {
13 | Ensure.ArgumentNotNull(obj,"obj");
14 |
15 | return (bool) obj.GetValue(SelectedIndexProperty);
16 | }
17 |
18 | public static void SetSelectedIndex(DependencyObject obj, bool value)
19 | {
20 | Ensure.ArgumentNotNull(obj, "obj");
21 |
22 | obj.SetValue(SelectedIndexProperty, value);
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Ensure.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 |
4 | namespace ElasticOps
5 | {
6 | public static class Ensure
7 | {
8 | public static void ArgumentNotNull(object value, string valueName)
9 | {
10 | if(value ==null)
11 | throw new ArgumentNullException(valueName);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ElasticOps/Events/AccentChangedEvent.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Events
2 | {
3 | public class AccentChangedEvent
4 | {
5 | public AccentChangedEvent(string accent)
6 | {
7 | Accent = accent;
8 | }
9 |
10 | public string Accent { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Events/ErrorOccurredEvent.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Events
2 | {
3 | public class ErrorOccurredEvent
4 | {
5 | public ErrorOccurredEvent(string errorMessage)
6 | {
7 | ErrorMessage = errorMessage;
8 | }
9 |
10 | public string ErrorMessage { get; set; }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Events/GoToStudioEvent.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Events
2 | {
3 | public class GoToStudioEvent { }
4 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Events/LogEntryCreatedEvent.cs:
--------------------------------------------------------------------------------
1 | using Serilog.Events;
2 |
3 | namespace ElasticOps.Events
4 | {
5 | public class LogEntryCreatedEvent
6 | {
7 | public LogEntryCreatedEvent(LogEvent logEvent)
8 | {
9 | LogEvent = logEvent;
10 | }
11 |
12 | public LogEvent LogEvent { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Events/NewConnectionEvent.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Events
2 | {
3 | public class NewConnectionEvent
4 | {
5 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#")]
6 | public NewConnectionEvent(string url)
7 | {
8 | URL = url;
9 | }
10 |
11 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")]
12 | public string URL { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Events/PreviewValueEvent.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Events
2 | {
3 | public class PreviewValueEvent
4 | {
5 | public PreviewValueEvent(string value)
6 | {
7 | Value = value;
8 | }
9 |
10 | public string Value { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ElasticOps/Events/RefreshEvent.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Events
2 | {
3 | public class RefreshEvent { }
4 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Events/ThemeChangedEvent.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Events
2 | {
3 | public class ThemeChangedEvent
4 | {
5 | public ThemeChangedEvent(string theme, bool isDark)
6 | {
7 | Theme = theme;
8 | IsDark = isDark;
9 | }
10 |
11 | public string Theme { get; set; }
12 |
13 | public bool IsDark { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Extensions/CollectionExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Caliburn.Micro;
5 | using ElasticOps.Attributes;
6 |
7 | namespace ElasticOps.Extensions
8 | {
9 | public static class CollectionExtensions
10 | {
11 | public static IEnumerable OrderByPriority(this IEnumerable collection)
12 | {
13 | return collection.OrderBy(x => GetPriority(x));
14 | }
15 |
16 | private static int GetPriority(object obj)
17 | {
18 | var attrs = obj.GetType().GetAttributes(true);
19 | if (!attrs.Any()) return int.MaxValue;
20 |
21 | return obj.GetType().GetAttributes(true).Min(x => x.Priority);
22 | }
23 |
24 | public static void ForEach(this IEnumerable enumerable, Action action)
25 | {
26 | Ensure.ArgumentNotNull(enumerable, "enumerable");
27 | Ensure.ArgumentNotNull(action, "action");
28 |
29 | foreach (var t in enumerable)
30 | {
31 | action(t);
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Extensions/IntExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace ElasticOps.Extensions
2 | {
3 | public static class IntExtensions
4 | {
5 | public static string Humanize(this int number)
6 | {
7 | return ((long) number).Humanize();
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Extensions/LongExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 |
4 | namespace ElasticOps.Extensions
5 | {
6 | public static class LongExtensions
7 | {
8 | public static string Humanize(this long number)
9 | {
10 | if (number == 0) return "0";
11 |
12 | double exponent = (long) Math.Log10(Math.Abs(number));
13 | switch ((long) Math.Floor(exponent))
14 | {
15 | case 0:
16 | case 1:
17 | case 2:
18 | return number.ToString(CultureInfo.InvariantCulture);
19 | case 3:
20 | case 4:
21 | case 5:
22 | return (number/1e3).ToString("F1", CultureInfo.InvariantCulture) + "K";
23 | case 6:
24 | case 7:
25 | case 8:
26 | return (number/1e6).ToString("F1", CultureInfo.InvariantCulture) + "M";
27 | case 9:
28 | case 10:
29 | case 11:
30 | return (number/1e9).ToString("F1", CultureInfo.InvariantCulture) + "G";
31 | case 12:
32 | case 13:
33 | case 14:
34 | return (number/1e12).ToString("F1", CultureInfo.InvariantCulture) + "T";
35 | case 15:
36 | case 16:
37 | case 17:
38 | return (number/1e15).ToString("F1", CultureInfo.InvariantCulture) + "P";
39 | case 18:
40 | case 19:
41 | case 20:
42 | return (number/1e18).ToString("F1", CultureInfo.InvariantCulture) + "E";
43 | case 21:
44 | case 22:
45 | case 23:
46 | return (number/1e21).ToString("F1", CultureInfo.InvariantCulture) + "Z";
47 | default:
48 | return (number/1e24).ToString("F1", CultureInfo.InvariantCulture) + "Y";
49 | }
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/src/ElasticOps/Extensions/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | namespace ElasticOps.Extensions
5 | {
6 | public static class StringExtensions
7 | {
8 | public static string GetTextBeforePosition(this string text, int line, int column)
9 | {
10 | if (text == null)
11 | throw new ArgumentException("text can't be null");
12 |
13 | if (column < 1)
14 | throw new ArgumentException("column number can't be less then 1");
15 |
16 | var lines = text.Split('\n');
17 | var caretLine = lines[line - 1];
18 | var leadingLines = line == 1 ? string.Empty : lines.Take(line - 1).Aggregate((c, n) => c + "\n" + n);
19 | var caretLinePrefix = caretLine.Substring(0, column - 1);
20 |
21 | if (string.IsNullOrEmpty(leadingLines))
22 | return caretLinePrefix;
23 |
24 | return leadingLines + "\n" + caretLinePrefix;
25 | }
26 |
27 | public static bool StartsWithIgnoreCase(this string value, string prefix)
28 | {
29 | Ensure.ArgumentNotNull(value, "value");
30 | Ensure.ArgumentNotNull(prefix, "prefix");
31 |
32 | return value.StartsWith(prefix, StringComparison.OrdinalIgnoreCase);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/ElasticOps/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/ElasticOps/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/src/ElasticOps/Infrastructure/Command.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Input;
3 |
4 | namespace ElasticOps
5 | {
6 | public class Command : ICommand
7 | {
8 | public Predicate