ACOR Documentation

Aho-Corasick on Redis, with one API across multiple topologies.

ACOR stores and queries Aho-Corasick patterns in Redis, and reaches you three ways — a Go library, an acor CLI, and an experimental server module speaking HTTP and gRPC. All three drive the same collection, across standalone Redis, Sentinel, Cluster, and Ring.

Getting Started

ACOR requires Go 1.25 or newer and Redis 3.0 or newer, or Valkey 7.2 or newer.

go get github.com/skyoo2003/acor/pkg/acor@latest
package main

import (
  "fmt"

  "github.com/skyoo2003/acor/pkg/acor"
)

func main() {
  ac, err := acor.Create(&acor.AhoCorasickArgs{
    Addr: "localhost:6379",
    Name: "sample",
  })
  if err != nil {
    panic(err)
  }
  defer ac.Close()

  _, _ = ac.Add("redis")
  matched, _ := ac.Find("redis-backed matching")
  fmt.Println(matched)
}

Explore the Documentation