Description
When compiling a basic Go application that imports github.com/blevesearch/bleve/v2, the build fails due to assignment mismatch errors inside the index/scorch package. The compiler flags issues where two variables are expected, but next.ID.Value and id.Value only return one value.
Steps to Reproduce
- Initialize a new Go module.
- Add the bleve/v2 dependency.
- Create a main.go file with the basic Bleve index setup
package main
import (
"fmt"
"github.com/blevesearch/bleve/v2"
)
func main() {
// open a new index
mapping := bleve.NewIndexMapping()
index, err := bleve.New("example.bleve", mapping)
if err != nil {
fmt.Println("Error creating index:", err)
return
}
// index some data
err = index.Index("", nil)
// search for some text
query := bleve.NewMatchQuery("text")
search := bleve.NewSearchRequest(query)
searchResults, err := index.Search(search)
fmt.Println(searchResults)
}
- Run go build or run the program via your IDE.
Expected Behavior
The application should compile successfully without throwing errors from the imported Bleve package.
Actual Behavior
The compilation fails with exit code 1. The run console outputs the following errors:
# github.com/blevesearch/bleve/v2/index/scorch
..\..\go\pkg\mod\github.com\blevesearch\bleve\v2@v2.4.0\index\scorch\snapshot_index.go:508:17: assignment mismatch: 2 variables but next.ID.Value returns 1 value
..\..\go\pkg\mod\github.com\blevesearch\bleve\v2@v2.4.0\index\scorch\snapshot_index.go:578:17: assignment mismatch: 2 variables but id.Value returns 1 value
..\..\go\pkg\mod\github.com\blevesearch\bleve\v2@v2.4.0\index\scorch\snapshot_index.go:596:17: assignment mismatch: 2 variables but id.Value returns 1 value
..\..\go\pkg\mod\github.com\blevesearch\bleve\v2@v2.4.0\index\scorch\snapshot_index.go:889:17: assignment mismatch: 2 variables but id.Value returns 1 value
..\..\go\pkg\mod\github.com\blevesearch\bleve\v2@v2.4.0\index\scorch\snapshot_index_tfr.go:184:14: assignment mismatch: 2 variables but ID.Value returns 1 value
Environment
OS: Windows
Bleve Version: v2.6.0
Description
When compiling a basic Go application that imports github.com/blevesearch/bleve/v2, the build fails due to assignment mismatch errors inside the index/scorch package. The compiler flags issues where two variables are expected, but next.ID.Value and id.Value only return one value.
Steps to Reproduce
Expected Behavior
The application should compile successfully without throwing errors from the imported Bleve package.
Actual Behavior
The compilation fails with exit code 1. The run console outputs the following errors:
Environment
OS: Windows
Bleve Version: v2.6.0