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: 16 days ago
JSON representation
:zap: Blazingly fast query engine
- Host: GitHub
- URL: https://github.com/rekki/go-query
- Owner: rekki
- License: mit
- Created: 2019-11-23T19:31:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-22T07:20:21.000Z (almost 3 years ago)
- Last Synced: 2024-11-01T19:35:37.733Z (6 months ago)
- Topics: and, and-not, dsl, golang, or, query
- Language: Go
- Homepage: https://pkg.go.dev/github.com/rekki/go-query
- Size: 302 KB
- Stars: 18
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.header
- License: LICENSE.md
Awesome Lists containing this project
- awesome-blazingly-fast - go-query - :zap: Blazingly fast query engine (Go)
README
## github.com/rekki/go-query: simple []int32 query library
[](https://travis-ci.org/rekki/go-query) [](https://codecov.io/gh/rekki/go-query) [](https://godoc.org/github.com/rekki/go-query)
used to build and execute queries such as:
```
n := 10 // total docs in indexAnd(
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, ... [](https://godoc.org/github.com/rekki/go-query/util/norm)
* util/tokenize: left edge, custom, charngram, unique, soundex, ... [](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 [](https://godoc.org/github.com/rekki/go-query/util/index)---