Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rekki/go-query

:zap: Blazingly fast query engine
https://github.com/rekki/go-query

and and-not dsl golang or query

Last synced: 11 days ago
JSON representation

:zap: Blazingly fast query engine

Awesome Lists containing this project

README

        

## github.com/rekki/go-query: simple []int32 query library

[![Build Status](https://travis-ci.org/rekki/go-query.svg?branch=master)](https://travis-ci.org/rekki/go-query) [![codecov](https://codecov.io/gh/rekki/go-query/branch/master/graph/badge.svg)](https://codecov.io/gh/rekki/go-query) [![GoDoc](https://godoc.org/github.com/rekki/go-query?status.svg)](https://godoc.org/github.com/rekki/go-query)

used to build and execute queries such as:

```
n := 10 // total docs in index

And(
Term(n, "name:hello", []int32{4, 5}),
Term(n, "name:world", []int32{4, 100}),
Or(
Term(n, "country:nl", []int32{20,30}),
Term(n, "country:uk", []int32{4,30}),
)
)
```

* scoring: only idf scode (for now)
* supported queries: or, and, and_not, dis_max, constant, term
* util/norm: space_between_digits, lowercase, trim, cleanup, ... [![GoDoc](https://godoc.org/github.com/rekki/go-query/util/norm?status.svg)](https://godoc.org/github.com/rekki/go-query/util/norm)
* util/tokenize: left edge, custom, charngram, unique, soundex, ... [![GoDoc](https://godoc.org/github.com/rekki/go-query/util/tokenize?status.svg)](https://godoc.org/github.com/rekki/go-query/util/tokenize)
* util/memory index: useful example of how to build more complex search engine with the library [![GoDoc](https://godoc.org/github.com/rekki/go-query/util/index?status.svg)](https://godoc.org/github.com/rekki/go-query/util/index)

---