├── .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 | ![Cluster info](/docs/images/cluster_info.jpg) 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 | ![Query - Intellisense](/docs/images/intellisense.jpg) 29 | 30 | It also supports URL autocomplete. Index names, types and endpoints are suggested. 31 | 32 | ![Query - URL Autocomplete](/docs/images/url_suggest.jpg) 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 | ![Analyze](/docs/images/analyze_and_highlight_tokens.jpg) 41 | 42 | View data 43 | --------- 44 | ![View data](/docs/images/view_data.jpg) 45 | 46 | 47 | REST 48 | ------- 49 | ![REST requests](/docs/images/REST_ES_enpoint_or_any_url.jpg) 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 | ![Multiple themes](/docs/images/theme_dark_accents_list.jpg) 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 CanExecuteDelegate { get; set; } 9 | public Action ExecuteDelegate { get; set; } 10 | 11 | public bool CanExecute(object parameter) 12 | { 13 | if (CanExecuteDelegate != null) 14 | return CanExecuteDelegate(parameter); 15 | return true; 16 | } 17 | 18 | public event EventHandler CanExecuteChanged 19 | { 20 | add { CommandManager.RequerySuggested += value; } 21 | remove { CommandManager.RequerySuggested -= value; } 22 | } 23 | 24 | public void Execute(object parameter) 25 | { 26 | if (ExecuteDelegate != null) 27 | ExecuteDelegate(parameter); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/ElasticOps/Infrastructure/Infrastructure.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | using ElasticOps.Commands; 3 | using ElasticOps.Configuration; 4 | 5 | namespace ElasticOps 6 | { 7 | public class Infrastructure 8 | { 9 | public Infrastructure(CommandBus commandBus, 10 | IEventAggregator eventAggregator, 11 | IWindowManager windowManager, 12 | ElasticOpsConfig config) 13 | { 14 | CommandBus = commandBus; 15 | EventAggregator = eventAggregator; 16 | WindowManager = windowManager; 17 | Config = config; 18 | Connection = new Connection(); 19 | } 20 | 21 | public Connection Connection { get; set; } 22 | public CommandBus CommandBus { get; set; } 23 | public IEventAggregator EventAggregator { get; set; } 24 | public IWindowManager WindowManager { get; set; } 25 | public ElasticOpsConfig Config { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /src/ElasticOps/Predef.cs: -------------------------------------------------------------------------------- 1 | namespace ElasticOps 2 | { 3 | internal static class Predef 4 | { 5 | public const string MarvelIndexPrefix = ".marvel"; 6 | public const string ConfigPath = "config\\config.yaml"; 7 | } 8 | } -------------------------------------------------------------------------------- /src/ElasticOps/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18449 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ElasticOps.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/ElasticOps/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/ElasticOps/Resources/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace ElasticOps 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /src/ElasticOps/Resources/Entypo-license.txt: -------------------------------------------------------------------------------- 1 | Entypo (http://www.entypo.com/) is created by Daniel Bruce and released under the Creative Commons, Share Alike/Attribution license. 2 | 3 | http://creativecommons.org/licenses/by-sa/3.0/ -------------------------------------------------------------------------------- /src/ElasticOps/Resources/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/ElasticOps/Resources/Entypo.ttf -------------------------------------------------------------------------------- /src/ElasticOps/Resources/Icons/paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/ElasticOps/Resources/Icons/paste.png -------------------------------------------------------------------------------- /src/ElasticOps/Resources/QueryDarkHighlightingRules.xshd: -------------------------------------------------------------------------------- 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 | \b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)? 45 | 46 | -------------------------------------------------------------------------------- /src/ElasticOps/Resources/QueryLightHighlightingRules.xshd: -------------------------------------------------------------------------------- 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 | \b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)? 45 | 46 | -------------------------------------------------------------------------------- /src/ElasticOps/Resources/WindowsIcons-license.txt: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | Please carefully understand the license and download the latest icons at ModernUIIcons.com. 4 | 5 | ## Understand Your Rights 6 | No Attribution and No Derived Works 7 | http://creativecommons.org/licenses/by-nd/3.0/ * 8 | 9 | - If your project is open source include this license file in the source. 10 | - Nothing is needed in the front facing project (UNLESS you 11 | are using any of the icons listed below in the attribution section). 12 | - Commercial use is not only allowed but encouraged. If it is an icon 13 | in the attribution list below, you still need to attribute those! 14 | - Do not distribute the entire package (I've allowed this dozens of 15 | times for open source projects, but email me first). 16 | 17 | ## Creator 18 | - Austin Andrews (@templarian) 19 | 20 | ## Contributor** 21 | - Jay Zawrotny (@JayZawrotny) 22 | - A Bunch 23 | - Oren Nachman 24 | - appbar.chevron.down 25 | - appbar.chevron.up 26 | - appbar.chevron.left 27 | - appbar.chevron.right 28 | 29 | ## Derived Works 30 | - Alex Peattie 31 | - Social: http://www.alexpeattie.com/projects/justvector_icons/ 32 | 33 | ## Attribution*** 34 | - Kris Vandermotten (@kvandermotten) 35 | - appbar.medical.pulse 36 | - Constantin Kichinsky (@kichinsky) 37 | - appbar.currency.rubles 38 | - appbar.currency.grivna 39 | - Massimo Savazzi (@msavazzi) 40 | - List of missing exported icons 41 | - Proletkult Graphik, from The Noun Project 42 | - appbar.draw.pen (inspired) 43 | - Olivier Guin, from The Noun Project 44 | - appbar.draw.marker 45 | - Gibran Bisio, from The Noun Project 46 | - appbar.draw.bucket 47 | Andrew Forrester, from The Noun Project 48 | - appbar.fingerprint 49 | 50 | * The license is for attribution, but this is not required. 51 | ** Developers and designers that emailed Templarian the source .design icons to be added into the package. PNGs also accepted, but may take longer to be added. 52 | *** Icons I've copied so closely you want to attribute them and are also under the CC license. 53 | 54 | Contact 55 | - http://templarian.com/ 56 | - admin[@]templarian[.]com 57 | 58 | * Does not apply to copyrighted logos 59 | - Skype 60 | - Facebook 61 | - Twitter 62 | - etc... 63 | -------------------------------------------------------------------------------- /src/ElasticOps/Resources/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/ElasticOps/Resources/icon.ico -------------------------------------------------------------------------------- /src/ElasticOps/Services/ConfigService.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | using ElasticOps.Commands; 3 | using ElasticOps.Events; 4 | 5 | namespace ElasticOps.Services 6 | { 7 | public class ConfigService : IHandle, IHandle 8 | { 9 | private readonly Infrastructure _infrastructure; 10 | 11 | public ConfigService(Infrastructure infrastructure) 12 | { 13 | Ensure.ArgumentNotNull(infrastructure, "infrastructure"); 14 | 15 | _infrastructure = infrastructure; 16 | infrastructure.EventAggregator.Subscribe(this); 17 | } 18 | 19 | public void Handle(ThemeChangedEvent message) 20 | { 21 | Ensure.ArgumentNotNull(message, "message"); 22 | 23 | _infrastructure.Config.Appearance.Theme = message.Theme; 24 | SaveConfig(); 25 | } 26 | 27 | public void Handle(AccentChangedEvent message) 28 | { 29 | Ensure.ArgumentNotNull(message, "message"); 30 | 31 | _infrastructure.Config.Appearance.Accent = message.Accent; 32 | } 33 | 34 | private void SaveConfig() 35 | { 36 | _infrastructure.Config.Save(Predef.ConfigPath); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/ElasticOps/Services/Index.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace ElasticOps.Services 6 | { 7 | public class Index 8 | { 9 | public Index(IEnumerable types) 10 | { 11 | Types = types.OrderBy(x => x); 12 | LastUpdated = DateTime.Now; 13 | } 14 | 15 | public IEnumerable Types { get; set; } 16 | public IEnumerable Analyzers { get; set; } 17 | public DateTime LastUpdated { get; set; } 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /src/ElasticOps/Services/ThemeService.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using Caliburn.Micro; 3 | using ElasticOps.Commands; 4 | using ElasticOps.Events; 5 | using MahApps.Metro; 6 | 7 | namespace ElasticOps.Services 8 | { 9 | public class ThemeService : IHandle, IHandle 10 | { 11 | private readonly Infrastructure _infrastructure; 12 | 13 | public ThemeService(Infrastructure infrastructure) 14 | { 15 | Ensure.ArgumentNotNull(infrastructure, "infrastructure"); 16 | 17 | 18 | _infrastructure = infrastructure; 19 | _infrastructure.EventAggregator.Subscribe(this); 20 | 21 | ChangeTheme(_infrastructure.Config.Appearance.Theme); 22 | ChangeAccent(_infrastructure.Config.Appearance.Accent); 23 | } 24 | 25 | private void ChangeAccent(string accentName) 26 | { 27 | var theme = ThemeManager.DetectAppStyle(Application.Current); 28 | var accent = ThemeManager.GetAccent(accentName); 29 | ThemeManager.ChangeAppStyle(Application.Current, accent, theme.Item1); 30 | _infrastructure.Config.Appearance.Accent = accentName; 31 | _infrastructure.Config.Save(Predef.ConfigPath); 32 | } 33 | 34 | private void ChangeTheme(string themeName) 35 | { 36 | var theme = ThemeManager.DetectAppStyle(Application.Current); 37 | var appTheme = ThemeManager.GetAppTheme(themeName); 38 | ThemeManager.ChangeAppStyle(Application.Current, theme.Item2, appTheme); 39 | _infrastructure.Config.Appearance.Theme = themeName; 40 | _infrastructure.Config.Save(Predef.ConfigPath); 41 | } 42 | 43 | public void Handle(AccentChangedEvent message) 44 | { 45 | Ensure.ArgumentNotNull(message, "message"); 46 | 47 | ChangeAccent(message.Accent); 48 | } 49 | 50 | public void Handle(ThemeChangedEvent message) 51 | { 52 | Ensure.ArgumentNotNull(message, "message"); 53 | 54 | ChangeTheme(message.Theme); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/AccentColorMenuData.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Input; 2 | using System.Windows.Media; 3 | using Caliburn.Micro; 4 | using ElasticOps.Commands; 5 | using ElasticOps.Events; 6 | 7 | namespace ElasticOps.ViewModels 8 | { 9 | public class AccentColorMenuData 10 | { 11 | private ICommand _changeAccentCommand; 12 | public string Name { get; set; } 13 | public Brush BorderColorBrush { get; set; } 14 | public Brush ColorBrush { get; set; } 15 | 16 | public ICommand ChangeAccentCommand 17 | { 18 | get 19 | { 20 | return _changeAccentCommand ?? 21 | (_changeAccentCommand = 22 | new Command 23 | { 24 | CanExecuteDelegate = x => true, 25 | ExecuteDelegate = x => DoChangeTheme(x) 26 | }); 27 | } 28 | } 29 | 30 | public virtual void DoChangeTheme(object sender) 31 | { 32 | AppBootstrapper.GetInstance().PublishOnUIThread(new AccentChangedEvent(Name)); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/AppThemeMenuData.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | using ElasticOps.Commands; 3 | using ElasticOps.Events; 4 | 5 | namespace ElasticOps.ViewModels 6 | { 7 | public class AppThemeMenuData : AccentColorMenuData 8 | { 9 | public override void DoChangeTheme(object sender) 10 | { 11 | AppBootstrapper.GetInstance() 12 | .PublishOnUIThread(new ThemeChangedEvent(Name, Name.Contains("Dark"))); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ClusterConnectedAutoRefreshScreen.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Caliburn.Micro; 3 | using ElasticOps.Commands; 4 | using ElasticOps.Events; 5 | 6 | namespace ElasticOps.ViewModels 7 | { 8 | internal abstract class ClusterConnectedAutoRefreshScreen : Screen, IHandle 9 | { 10 | private bool _isRefreshing; 11 | 12 | protected ClusterConnectedAutoRefreshScreen(Infrastructure infrastructure) 13 | { 14 | Ensure.ArgumentNotNull(infrastructure, "infrastructure"); 15 | 16 | EventAggregator = infrastructure.EventAggregator; 17 | CommandBus = infrastructure.CommandBus; 18 | Connection = infrastructure.Connection; 19 | } 20 | 21 | protected IEventAggregator EventAggregator { get; set; } 22 | protected CommandBus CommandBus { get; set; } 23 | protected Connection Connection { get; set; } 24 | 25 | public bool IsRefreshing 26 | { 27 | get { return _isRefreshing; } 28 | set 29 | { 30 | _isRefreshing = value; 31 | NotifyOfPropertyChange(() => IsRefreshing); 32 | } 33 | } 34 | 35 | public void Handle(RefreshEvent message) 36 | { 37 | if (!IsRefreshing) 38 | StartRefreshingData(); 39 | } 40 | 41 | protected override void OnDeactivate(bool close) 42 | { 43 | Deactivate(close); 44 | } 45 | 46 | public void Deactivate(bool close) 47 | { 48 | EventAggregator.Unsubscribe(this); 49 | base.OnDeactivate(close); 50 | } 51 | 52 | protected override void OnActivate() 53 | { 54 | EventAggregator.Subscribe(this); 55 | StartRefreshingData(); 56 | base.OnActivate(); 57 | } 58 | 59 | private void StartRefreshingData() 60 | { 61 | IsRefreshing = true; 62 | Task.Factory.StartNew(RefreshData) 63 | .ContinueWith(t => IsRefreshing = false); 64 | } 65 | 66 | public abstract void RefreshData(); 67 | } 68 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ComboBoxItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | 3 | namespace ElasticOps.ViewModels 4 | { 5 | public class ComboBoxItemViewModel : PropertyChangedBase 6 | { 7 | private string _displayText; 8 | 9 | private object _value; 10 | 11 | public string DisplayText 12 | { 13 | get { return _displayText; } 14 | set 15 | { 16 | _displayText = value; 17 | NotifyOfPropertyChange(() => DisplayText); 18 | } 19 | } 20 | 21 | public object Value 22 | { 23 | get { return _value; } 24 | set 25 | { 26 | _value = value; 27 | NotifyOfPropertyChange(() => Value); 28 | } 29 | } 30 | 31 | public static ComboBoxItemViewModel FromString(string value) 32 | { 33 | return new ComboBoxItemViewModel 34 | { 35 | Value = value, 36 | DisplayText = value, 37 | }; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ElasticPropertyViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using Caliburn.Micro; 3 | 4 | namespace ElasticOps.ViewModels 5 | { 6 | public class ElasticPropertyViewModel : PropertyChangedBase 7 | { 8 | private string _label; 9 | 10 | private string _value; 11 | 12 | public string Label 13 | { 14 | get { return _label; } 15 | set 16 | { 17 | _label = value; 18 | NotifyOfPropertyChange(() => Label); 19 | } 20 | } 21 | 22 | public string Value 23 | { 24 | get { return _value; } 25 | set 26 | { 27 | _value = value; 28 | NotifyOfPropertyChange(() => Value); 29 | } 30 | } 31 | 32 | public void CopyToClipboard() 33 | { 34 | Clipboard.SetText(Value); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ManagementScreens/ClusterInfoScreenViewModels/BasicInfoViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Caliburn.Micro; 4 | using ElasticOps.Commands; 5 | 6 | namespace ElasticOps.ViewModels.ManagementScreens 7 | { 8 | internal class BasicInfoViewModel : ClusterConnectedAutoRefreshScreen 9 | { 10 | private IEnumerable _clusterHealthProperties; 11 | 12 | public BasicInfoViewModel(Infrastructure infrastructure) 13 | : base(infrastructure) 14 | { 15 | ClusterHealthProperties = new BindableCollection(); 16 | } 17 | 18 | public IEnumerable ClusterHealthProperties 19 | { 20 | get { return _clusterHealthProperties; } 21 | set 22 | { 23 | if (Equals(value, _clusterHealthProperties)) return; 24 | _clusterHealthProperties = value; 25 | NotifyOfPropertyChange(() => ClusterHealthProperties); 26 | } 27 | } 28 | 29 | public override void RefreshData() 30 | { 31 | var result = CommandBus.Execute(new ClusterInfo.HealthCommand(Connection)); 32 | 33 | if (result.Failed) return; 34 | 35 | ClusterHealthProperties = 36 | result.Result.Select( 37 | element => new ElasticPropertyViewModel {Label = element.Key, Value = element.Value}); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ManagementScreens/ClusterInfoScreenViewModels/DocumentsInfoViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Caliburn.Micro; 5 | using ElasticOps.Commands; 6 | using Serilog; 7 | 8 | namespace ElasticOps.ViewModels.ManagementScreens 9 | { 10 | internal class DocumentsInfoViewModel : ClusterConnectedAutoRefreshScreen 11 | { 12 | private IEnumerable _documents; 13 | 14 | public DocumentsInfoViewModel(Infrastructure infrastructure) 15 | : base(infrastructure) 16 | { 17 | Documents = new BindableCollection(); 18 | } 19 | 20 | public IEnumerable Documents 21 | { 22 | get { return _documents; } 23 | set 24 | { 25 | _documents = value; 26 | NotifyOfPropertyChange(() => Documents); 27 | } 28 | } 29 | 30 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] 31 | public override void RefreshData() 32 | { 33 | try 34 | { 35 | var result = CommandBus.Execute(new ClusterInfo.DocumentsInfoCommand(Connection)); 36 | 37 | if (result.Failed) return; 38 | 39 | var docs = result.Result.Select(docInfo => new ElasticPropertyViewModel 40 | { 41 | Label = docInfo.Key, 42 | Value = docInfo.Value 43 | }); 44 | 45 | Documents = docs; 46 | } 47 | catch (Exception ex) 48 | { 49 | Log.Logger.Warning(ex, "Exception while refreshing data."); 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ManagementScreens/ClusterInfoScreenViewModels/MappingsInfoViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using ElasticOps.Commands; 3 | 4 | namespace ElasticOps.ViewModels.ManagementScreens 5 | { 6 | internal class MappingsInfoViewModel : ClusterConnectedAutoRefreshScreen 7 | { 8 | private readonly Infrastructure _infrastructure; 9 | 10 | private string _mapping; 11 | 12 | public MappingsInfoViewModel(TypesListViewModel typesListViewModel, Infrastructure infrastructure) 13 | : base(infrastructure) 14 | { 15 | _infrastructure = infrastructure; 16 | TypesList = typesListViewModel; 17 | TypesList.PropertyChanged += (sender, args) => 18 | { 19 | if (args.PropertyName != "SelectedType") return; 20 | 21 | LoadMapping(); 22 | }; 23 | } 24 | 25 | public TypesListViewModel TypesList { get; set; } 26 | 27 | public string Mapping 28 | { 29 | get { return _mapping; } 30 | set 31 | { 32 | _mapping = value; 33 | NotifyOfPropertyChange(() => Mapping); 34 | } 35 | } 36 | 37 | public override void RefreshData() 38 | { 39 | TypesList.RefreshData(); 40 | } 41 | 42 | private void LoadMapping() 43 | { 44 | if (string.IsNullOrEmpty(TypesList.SelectedIndex) || string.IsNullOrEmpty(TypesList.SelectedType)) return; 45 | 46 | var res = _infrastructure.CommandBus.Execute(new ClusterInfo.GetMappingCommand(_infrastructure.Connection, 47 | TypesList.SelectedIndex, TypesList.SelectedType)); 48 | 49 | if (res.Success) Mapping = res.Result; 50 | } 51 | 52 | public void CopyToCliboard() 53 | { 54 | Clipboard.SetText(Mapping); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ManagementScreens/ClusterInfoScreenViewModels/NodesInfoViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Caliburn.Micro; 4 | using ElasticOps.Commands; 5 | 6 | namespace ElasticOps.ViewModels.ManagementScreens 7 | { 8 | internal class NodesInfoViewModel : ClusterConnectedAutoRefreshScreen 9 | { 10 | private IEnumerable _nodesInfo; 11 | 12 | public NodesInfoViewModel(Infrastructure infrastructure) 13 | : base(infrastructure) 14 | { 15 | NodesInfo = new BindableCollection(); 16 | } 17 | 18 | public IEnumerable NodesInfo 19 | { 20 | get { return _nodesInfo; } 21 | set 22 | { 23 | if (Equals(value, _nodesInfo)) return; 24 | _nodesInfo = value; 25 | NotifyOfPropertyChange(() => NodesInfo); 26 | } 27 | } 28 | 29 | public override void RefreshData() 30 | { 31 | var result = 32 | CommandBus.Execute(new ClusterInfo.NodesInfoCommand(Connection)); 33 | 34 | if (!result.Success) return; 35 | 36 | NodesInfo = result.Result.Select(node => new NodeInfoViewModel(node)); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ManagementScreens/ConsoleViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.ObjectModel; 3 | using Caliburn.Micro; 4 | using ElasticOps.Attributes; 5 | using ElasticOps.Commands; 6 | using ElasticOps.Events; 7 | 8 | namespace ElasticOps.ViewModels.ManagementScreens 9 | { 10 | public class LogEventViewModel 11 | { 12 | public string Text { get; set; } 13 | public string Level { get; set; } 14 | public DateTimeOffset Timestamp { get; set; } 15 | } 16 | 17 | [Priority(100)] 18 | public class ConsoleViewModel : Screen, IManagementScreen, IHandle 19 | { 20 | 21 | public ConsoleViewModel(Infrastructure infrastructure) 22 | { 23 | Ensure.ArgumentNotNull(infrastructure, "infrastructure"); 24 | 25 | base.DisplayName = "Logs"; 26 | LogEntries = new ObservableCollection(); 27 | infrastructure.EventAggregator.Subscribe(this); 28 | } 29 | 30 | public ObservableCollection LogEntries { get; private set; } 31 | 32 | public void Handle(LogEntryCreatedEvent message) 33 | { 34 | Ensure.ArgumentNotNull(message, "message"); 35 | 36 | LogEntries.Add(new LogEventViewModel 37 | { 38 | Level = message.LogEvent.Level.ToString(), 39 | Text = message.LogEvent.RenderMessage(), 40 | Timestamp = message.LogEvent.Timestamp, 41 | }); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ManagementScreens/DataViewerViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using ElasticOps.Attributes; 4 | using ElasticOps.Commands; 5 | using Newtonsoft.Json; 6 | 7 | namespace ElasticOps.ViewModels.ManagementScreens 8 | { 9 | [Priority(40)] 10 | internal class DataViewerViewModel : ClusterConnectedAutoRefreshScreen, IManagementScreen 11 | { 12 | private readonly Infrastructure _infrastructure; 13 | private IEnumerable _documents; 14 | 15 | public DataViewerViewModel(Infrastructure infrastructure, TypesListViewModel typesListViewModel, 16 | PaggerViewModel paggerModel) 17 | : base(infrastructure) 18 | { 19 | _infrastructure = infrastructure; 20 | TypesList = typesListViewModel; 21 | base.DisplayName = "Data Viewer"; 22 | PaggerModel = paggerModel; 23 | paggerModel.OnPageChanged = View; 24 | } 25 | 26 | public PaggerViewModel PaggerModel { get; set; } 27 | 28 | 29 | public TypesListViewModel TypesList { get; set; } 30 | 31 | public IEnumerable Documents 32 | { 33 | get { return _documents; } 34 | set 35 | { 36 | if (Equals(value, _documents)) return; 37 | _documents = value; 38 | NotifyOfPropertyChange(() => Documents); 39 | } 40 | } 41 | 42 | public void View() 43 | { 44 | var res = 45 | _infrastructure.CommandBus.Execute(new DataView.PageCommand(_infrastructure.Connection, 46 | TypesList.SelectedIndex, TypesList.SelectedType, PaggerModel.PageSize, PaggerModel.Page)); 47 | if (res.Success) 48 | { 49 | Documents = res.Result.Documents.Select(x => JsonConvert.DeserializeObject(x.ToString())); 50 | PaggerModel.Total = res.Result.Hits; 51 | } 52 | } 53 | 54 | public override void RefreshData() 55 | { 56 | TypesList.RefreshData(); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/ManagementScreens/IManagementScreen.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | 3 | namespace ElasticOps.ViewModels.ManagementScreens 4 | { 5 | public interface IManagementScreen : IScreen 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /src/ElasticOps/ViewModels/StudioViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Caliburn.Micro; 4 | using ElasticOps.Extensions; 5 | using ElasticOps.ViewModels.ManagementScreens; 6 | 7 | namespace ElasticOps.ViewModels 8 | { 9 | public class StudioViewModel : Conductor.Collection.OneActive 10 | { 11 | private ClusterConnectionViewModel _clusterConnectionViewModel; 12 | 13 | public StudioViewModel(IEnumerable managementScreens, 14 | ClusterConnectionViewModel clusterConnectionViewModel) 15 | { 16 | ClusterConnectionViewModel = clusterConnectionViewModel; 17 | ManagementScreens = new BindableCollection(); 18 | ManagementScreens.AddRange(managementScreens.OrderByPriority()); 19 | 20 | ManagementScreens.ToList().ForEach(x => x.ConductWith(this)); 21 | } 22 | 23 | public ClusterConnectionViewModel ClusterConnectionViewModel 24 | { 25 | get { return _clusterConnectionViewModel; } 26 | set 27 | { 28 | _clusterConnectionViewModel = value; 29 | NotifyOfPropertyChange(() => ClusterConnectionViewModel); 30 | } 31 | } 32 | 33 | public IObservableCollection ManagementScreens { get; private set; } 34 | } 35 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ClusterConnectionView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views 4 | { 5 | /// 6 | /// Interaction logic for ClusterConnectionView.xaml 7 | /// 8 | public partial class ClusterConnectionView : UserControl 9 | { 10 | public ClusterConnectionView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/Controls/CodeEditor.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/Controls/CodeEditor.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using System.Windows.Media; 3 | using ICSharpCode.AvalonEdit.Folding; 4 | 5 | namespace ElasticOps.Views.Controls 6 | { 7 | /// 8 | /// Interaction logic for CodeEditor.xaml 9 | /// 10 | public partial class CodeEditor : UserControl 11 | { 12 | public CodeEditor() 13 | { 14 | InitializeComponent(); 15 | 16 | TextEditor.TextArea.TextView.LinkTextForegroundBrush = new SolidColorBrush(Color.FromRgb(0x68, 0xCE, 0xF9)); 17 | 18 | SetupFolding(); 19 | } 20 | 21 | private void SetupFolding() 22 | { 23 | var foldingStrategy = new BraceFoldingStrategy(); 24 | var foldingManager = FoldingManager.Install(TextEditor.TextArea); 25 | foldingStrategy.UpdateFoldings(foldingManager, TextEditor.Document); 26 | TextEditor.TextChanged += 27 | (sender, args) => foldingStrategy.UpdateFoldings(foldingManager, TextEditor.Document); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ElasticPropertyView.xaml: -------------------------------------------------------------------------------- 1 |  8 | 10 | 12 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ElasticPropertyView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views 4 | { 5 | /// 6 | /// Interaction logic for ElasticPropertyView.xaml 7 | /// 8 | public partial class ElasticPropertyView : UserControl 9 | { 10 | public ElasticPropertyView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/FooterView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/FooterView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views 4 | { 5 | /// 6 | /// Interaction logic for FooterView.xaml 7 | /// 8 | public partial class FooterView : UserControl 9 | { 10 | public FooterView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/AnalyzeView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using ElasticOps.Commands; 3 | 4 | namespace ElasticOps.Views.ManagementScreens 5 | { 6 | /// 7 | /// Interaction logic for AnalyzeView.xaml 8 | /// 9 | public partial class AnalyzeView : UserControl 10 | { 11 | public AnalyzeView() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e) 17 | { 18 | if (TokensGrid.SelectedItem != null) 19 | { 20 | var token = TokensGrid.SelectedItem as AnalyzedToken; 21 | 22 | if (token == null) return; 23 | 24 | Text.Focus(); 25 | Text.CaretIndex = token.StartOffset; 26 | Text.Select(token.StartOffset, token.EndOffset - token.StartOffset); 27 | 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/BasicInfoView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/BasicInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for BasicInfoView.xaml 7 | /// 8 | public partial class BasicInfoView : UserControl 9 | { 10 | public BasicInfoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/ClusterInfoScreenView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for ClusterInfoScreenView.xaml 7 | /// 8 | public partial class ClusterInfoScreenView : UserControl 9 | { 10 | public ClusterInfoScreenView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/ConsoleView.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/ConsoleView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for ConsoleView.xaml 7 | /// 8 | public partial class ConsoleView : UserControl 9 | { 10 | public ConsoleView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/DataViewerView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/DataViewerView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using System.Windows.Input; 4 | using Caliburn.Micro; 5 | using ElasticOps.Commands; 6 | using ElasticOps.Events; 7 | 8 | namespace ElasticOps.Views.ManagementScreens 9 | { 10 | /// 11 | /// Interaction logic for DataViewerView.xaml 12 | /// 13 | public partial class DataViewerView : UserControl 14 | { 15 | public DataViewerView() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void EventSetter_OnHandler(object sender, RoutedEventArgs e) 21 | { 22 | var cell = (DataGridCell)sender; 23 | 24 | if (cell.Content is TextBlock) 25 | AppBootstrapper.GetInstance() 26 | .PublishOnUIThread(new PreviewValueEvent(((TextBlock)cell.Content).Text)); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/DocumentsInfoView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/DocumentsInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for DocumentsInfoView.xaml 7 | /// 8 | public partial class DocumentsInfoView : UserControl 9 | { 10 | public DocumentsInfoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/IndexInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for IndiceInfoView.xaml 7 | /// 8 | public partial class IndexInfoView : UserControl 9 | { 10 | public IndexInfoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/IndicesInfoView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/IndicesInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for IndicesInfoView.xaml 7 | /// 8 | public partial class IndicesInfoView : UserControl 9 | { 10 | public IndicesInfoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/MappingsInfoView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/MappingsInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for MappingsInfoView.xaml 7 | /// 8 | public partial class MappingsInfoView : UserControl 9 | { 10 | public MappingsInfoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/NodeInfoView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/NodeInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for NodeInfoView.xaml 7 | /// 8 | public partial class NodeInfoView : UserControl 9 | { 10 | public NodeInfoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/NodesInfoView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/NodesInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for NodesInfoView.xaml 7 | /// 8 | public partial class NodesInfoView : UserControl 9 | { 10 | public NodesInfoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/QueryView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views 4 | { 5 | /// 6 | /// Interaction logic for QueryView.xaml 7 | /// 8 | public partial class QueryView : UserControl 9 | { 10 | public QueryView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ManagementScreens/RESTScreenView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views.ManagementScreens 4 | { 5 | /// 6 | /// Interaction logic for RESTScreenView.xaml 7 | /// 8 | public partial class RESTScreenView : UserControl 9 | { 10 | public RESTScreenView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/Pagger.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | of 25 | 27 | 34 | Total: 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/Pagger.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views 4 | { 5 | /// 6 | /// Interaction logic for Pagger.xaml 7 | /// 8 | public partial class Pagger : UserControl 9 | { 10 | public Pagger() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/ShellView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using MahApps.Metro.Controls; 3 | 4 | namespace ElasticOps.Views 5 | { 6 | public partial class ShellView : MetroWindow 7 | { 8 | public ShellView() 9 | { 10 | InitializeComponent(); 11 | 12 | Closed += ShellView_Closed; 13 | } 14 | 15 | private void ShellView_Closed(object sender, System.EventArgs e) 16 | { 17 | Application.Current.Shutdown(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/StudioView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 21 | 22 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/StudioView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views 4 | { 5 | /// 6 | /// Interaction logic for StudioView.xaml 7 | /// 8 | public partial class StudioView : UserControl 9 | { 10 | public StudioView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/Views/TypesListView.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/ElasticOps/Views/TypesListView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace ElasticOps.Views 4 | { 5 | /// 6 | /// Interaction logic for TypesListView.xaml 7 | /// 8 | public partial class TypesListView : UserControl 9 | { 10 | public TypesListView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/ElasticOps/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/SolutionItems/Config.yaml: -------------------------------------------------------------------------------- 1 | DefaultClusterUrl : http://localhost:9200 2 | DefaultQueryUrl : _search 3 | RefreshInterval : 10 4 | Appearance: 5 | Theme: BaseLight 6 | Accent: Green 7 | Footer: 8 | ErrorTimout: 5 9 | URLSuggest : 10 | IncludeMarvelIndices : false 11 | Endpoints : 12 | Indices : 13 | - _open 14 | - _close 15 | - _aliases 16 | - _warmers 17 | - _mappings 18 | - _settings 19 | - _mapping 20 | - _aliases 21 | - _analyze 22 | - _status 23 | - _stats 24 | - _segments 25 | - _recovery 26 | - _cache/clear 27 | - _refresh 28 | - _flush 29 | - _upgrade 30 | Cluster : 31 | - _aliases 32 | - _all 33 | - _cache/clear 34 | - _cluster/health 35 | - _cluster/settings 36 | - _cluster/state 37 | - _count 38 | - _mapping 39 | - _nodes 40 | - _nodes/hot_threads 41 | - _refresh 42 | - _segments 43 | - _settings 44 | - _search 45 | - _cluster/state 46 | - _stats 47 | - _status 48 | - _warmer 49 | - _template 50 | Type : 51 | - _count 52 | - _warmer 53 | - _mapping 54 | - _search -------------------------------------------------------------------------------- /src/SolutionItems/FsLexYacc.6.0.4/FSharp.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/SolutionItems/FsLexYacc.6.0.4/FSharp.Core.dll -------------------------------------------------------------------------------- /src/SolutionItems/FsLexYacc.6.0.4/FsLexYacc.Build.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/belczyk/elasticops/dd7eb2f7139f69258ce610f3c15bd40d4aee2e30/src/SolutionItems/FsLexYacc.6.0.4/FsLexYacc.Build.Tasks.dll -------------------------------------------------------------------------------- /src/SolutionItems/IntellisenseConfig.yaml: -------------------------------------------------------------------------------- 1 | IntellisenseEndpoints: 2 | - _search 3 | - _mapping 4 | RulesFileFomrat : Config/IntellisenseRules{0}.json 5 | AutoCompleteChars : 6 | - "[" 7 | - "{" 8 | -------------------------------------------------------------------------------- /src/SolutionItems/IntellisenseRules_mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "analyzer" |standard|, 3 | "date_detection" |true|, 4 | "dynamic_date_formats" |empty_array|, 5 | "index_analyzer" |standard|, 6 | "numeric_detection" |true|, 7 | "search_analyzer" |standard|, 8 | "transform": { 9 | "script" |empty_string|, 10 | "lang" |groovy|, 11 | "params" |empty_object| 12 | }, 13 | "properties": { 14 | AnyProperty : { 15 | "analyzer" |standard|, 16 | "boost" |int_1|, 17 | "copy_to" |field_placeholder|, 18 | "fielddata": { 19 | "filter" |empty_string| 20 | }, 21 | "format" |basic_date|, 22 | "ignore_above" |int_10|, 23 | "ignore_malformed" |true|, 24 | "include_in_all" |false|, 25 | "include_in_parent" |true|, 26 | "include_in_root" |true|, 27 | "index" |analyzed|, 28 | "index_analyzer" |standard|, 29 | "index_name" |empty_string|, 30 | "index_options" |docs|, 31 | "null_value" |empty_string|, 32 | "omit_norms" |true|, 33 | "path" |just_name|, 34 | "position_offset_gap" |int_0|, 35 | "postings_format" |direct|, 36 | "precision_step" |int_4|, 37 | "search_analyzer" |standard|, 38 | "similarity" |default|, 39 | "store" |true|, 40 | "term_vector" |no|, 41 | "type" |empty_string| 42 | } 43 | } 44 | } --------------------------------------------------------------------------------