func NewIndex(mapping Mapping) *Index {
	return &Index{
		Mapping:         mapping,
		DocumentStore:   indexing.NewDocumentStore(),
		InvertedIndexes: map[string]*indexing.InvertedIndex{},
	}
}
NewIndex initializes an InvertedIndex with the given Mapping.
package gosearchengine
import (
	"github.com/dwayhs/go-search-engine/analysis"
	"github.com/dwayhs/go-search-engine/analysis/analyzers"
	"github.com/dwayhs/go-search-engine/core"
	"github.com/dwayhs/go-search-engine/indexing"
)
type Mapping struct {
	Attributes map[string]analyzers.Analyzer
}
type Index struct {
	InvertedIndexes map[string]*indexing.InvertedIndex
	DocumentStore   *indexing.DocumentStore
	Mapping         Mapping
}