Skip to content

dwayhs/go-search-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Search Engine

Build Status Go Report Card BCH compliance GoDoc

This project is intended for educational purposes.

Usage

Creating an index

index := NewIndex(
  Mapping{
    Attributes: map[string]analyzers.Analyzer{
      "body": analyzers.NewSimpleAnalyzer(),
    },
  },
)

Indexing

docA := core.Document{
  Attributes: map[string]string{
    "body": "The quick brown fox jumps over the lazy dog",
  },
}

index.Index(docA)

Querying

searchResult := index.Search("body", "quick fox")

Credits

Project inspired by the presentation "Building A Python-Based Search Engine" on Pycon US 2012 by Daniel Lindsley.

About

Simple search engine implemented using Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages