Skip to content
/ bleve Public
forked from blevesearch/bleve

A modern text indexing library for go

License

Notifications You must be signed in to change notification settings

x-mod/bleve

This branch is 180 commits behind blevesearch/bleve:master.

Folders and files

NameName
Last commit message
Last commit date
Sep 13, 2022
Dec 1, 2022
Dec 10, 2021
Nov 3, 2021
Aug 10, 2022
Oct 2, 2016
Nov 11, 2022
Jul 22, 2022
Jun 1, 2022
Dec 15, 2022
Oct 18, 2022
Mar 26, 2019
Oct 18, 2022
Nov 11, 2022
Apr 24, 2018
Nov 11, 2022
Nov 30, 2021
Apr 2, 2020
Jun 26, 2016
Apr 17, 2014
Sep 13, 2022
Jun 1, 2022
Jan 12, 2021
May 12, 2020
Jan 12, 2021
Dec 10, 2021
Dec 10, 2021
Oct 2, 2016
Jan 12, 2021
Nov 30, 2021
Nov 30, 2022
Nov 30, 2022
Aug 6, 2021
Oct 2, 2016
Nov 11, 2022
Jan 12, 2021
Nov 11, 2022
Aug 6, 2021
Oct 2, 2016
Oct 2, 2016
Dec 15, 2022
Oct 12, 2022
Nov 3, 2021
Nov 17, 2022
Dec 2, 2022
Oct 18, 2022

Repository files navigation

bleve bleve

Tests Coverage Status GoDoc Join the chat at https://gitter.im/blevesearch/bleve codebeat Go Report Card Sourcegraph License

modern text indexing in go - blevesearch.com

Features

  • Index any go data structure (including JSON)
  • Intelligent defaults backed up by powerful configuration
  • Supported field types:
    • Text, Numeric, Datetime, Boolean
  • Supported query types:
    • Term, Phrase, Match, Match Phrase, Prefix, Fuzzy
    • Conjunction, Disjunction, Boolean (must/should/must_not)
    • Term Range, Numeric Range, Date Range
    • Geo Spatial
    • Simple query string syntax for human entry
  • tf-idf Scoring
  • Boosting
  • Search result match highlighting
  • Aggregations/faceting support:
    • Terms Facet
    • Numeric Range Facet
    • Date Range Facet

Discussion/Issues

Discuss usage/development of bleve and/or report issues here:

Indexing

message := struct{
	Id   string
	From string
	Body string
}{
	Id:   "example",
	From: "marty.schoch@gmail.com",
	Body: "bleve indexing is easy",
}

mapping := bleve.NewIndexMapping()
index, err := bleve.New("example.bleve", mapping)
if err != nil {
	panic(err)
}
index.Index(message.Id, message)

Querying

index, _ := bleve.Open("example.bleve")
query := bleve.NewQueryStringQuery("bleve")
searchRequest := bleve.NewSearchRequest(query)
searchResult, _ := index.Search(searchRequest)

Command Line Interface

To install the CLI for the latest release of bleve, run:

$ go install github.com/blevesearch/bleve/v2/cmd/bleve@latest
$ bleve --help
Bleve is a command-line tool to interact with a bleve index.

Usage:
  bleve [command]

Available Commands:
  bulk        bulk loads from newline delimited JSON files
  check       checks the contents of the index
  count       counts the number documents in the index
  create      creates a new index
  dictionary  prints the term dictionary for the specified field in the index
  dump        dumps the contents of the index
  fields      lists the fields in this index
  help        Help about any command
  index       adds the files to the index
  mapping     prints the mapping used for this index
  query       queries the index
  registry    registry lists the bleve components compiled into this executable
  scorch      command-line tool to interact with a scorch index

Flags:
  -h, --help   help for bleve

Use "bleve [command] --help" for more information about a command.

Text Analysis Wizard

bleveanalysis.couchbase.com

License

Apache License Version 2.0

About

A modern text indexing library for go

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.8%
  • Other 0.2%