Skip to content

dbarbashov/Elasticsearch.FSharp

Repository files navigation

Elasticsearch.FSharp

Compose type-checked ElasticSearch queries with the power of F# language.

Nuget Version Github Actions Badge

Example

F# query:

let query = 
    Search [
        Sort [
            "timestamp", [Order SortOrder.Desc]
        ]
        Query MatchAll
    ]

Would result in following JSON:

{
  "sort": [
    { "timestamp": { "order": "asc" } }
  ],
  "query": {
    "match_all": {}
  }
}

Features

  • Compose strongly-typed F#-first ElasticSearch queries
  • Generate index mappings by assigning attributes to your types

Supported Elastic versions

  • ElasticSearch 6

Roadmap

Queries

  • Size
  • From
  • Sort
    • Sort order
    • Sort mode
  • Query
    • Match all query
    • Match none query
    • Ids query
    • Bool query
      • Must
      • Must not
      • Should
      • Filter
      • MinimumShouldMatch
    • Match query
    • Term query
    • Terms query
    • Range query
    • Script query
    • MultiMatch query
    • MatchPhrasePrefix query
    • Exists query
    • Type query