Skip to content

Instantly share code, notes, and snippets.

@indraniel
indraniel / toy-bleve-example.go
Last active October 9, 2023 13:05
This is a toy search example using bleve. It also highlights how to retrieve the orignal input document(s) from the KV store.
package main
// mentioned in bleve google group
// https://groups.google.com/forum/#!topic/bleve/-5Q6W3oBizY
import (
"encoding/json"
"fmt"
"github.com/blevesearch/bleve"
"github.com/blevesearch/bleve/document"
""" Generate lovely ideas for hack day talks """
import random
import re
productions = {
'tech': [
'HTML5',
'Audio',
'CoffeeScript',