Environment
OS: Zorin OS 18.1
Go: 1.26.3
Belve: v2.6.0
Description
# github.com/blevesearch/geo/geojson
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:100:9: cannot use rv (variable of type *Point) as index.GeoJSON value in return statement: *Point does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:129:46: cannot use p (variable of type *Point) as index.GeoJSON value in argument to checkPointIntersectsShape: *Point does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:155:9: cannot use rv (variable of type *MultiPoint) as index.GeoJSON value in return statement: *MultiPoint does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:206:49: cannot use p (variable of type *MultiPoint) as index.GeoJSON value in argument to checkPointIntersectsShape: *MultiPoint does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:241:17: cannot use &Point{…} (value of type *Point) as index.GeoJSON value in assignment: *Point does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:258:9: cannot use rv (variable of type *LineString) as index.GeoJSON value in return statement: *LineString does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:297:64: cannot use ls (variable of type *LineString) as index.GeoJSON value in argument to checkLineStringsIntersectsShape: *LineString does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:322:9: cannot use rv (variable of type *MultiLineString) as index.GeoJSON value in return statement: *MultiLineString does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:366:48: cannot use p (variable of type *MultiLineString) as index.GeoJSON value in argument to checkLineStringsIntersectsShape: *MultiLineString does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:389:16: cannot use &LineString{…} (value of type *LineString) as index.GeoJSON value in assignment: *LineString does not implement index.GeoJSON (missing method BoundingBox)
../../go/pkg/mod/github.com/blevesearch/geo@v0.2.5/geojson/geojson_shapes_impl.go:389:16: too many errors
Replication Steps
- Initialize new go module
- Run
go get github.com/blevesearch/bleve/v2@v2.6.0
- Create the main.go file with the code below:
package main
import (
"log"
"github.com/blevesearch/bleve/v2"
"github.com/blevesearch/bleve/v2/mapping"
)
type Document struct {
Name string `json:"name"`
Description string `json:"desc"`
}
func main() {
// Define mapping
idxMapping := mapping.NewIndexMapping()
nameFieldMapping := mapping.NewTextFieldMapping()
descFieldMapping := mapping.NewTextFieldMapping()
idxMapping.DefaultMapping = mapping.NewDocumentMapping()
idxMapping.DefaultMapping.AddFieldMappingsAt("name", nameFieldMapping)
idxMapping.DefaultMapping.AddFieldMappingsAt("desc", descFieldMapping)
// Create new index
idx, err := bleve.New("test.belve", idxMapping)
if err != nil {
log.Fatal(err)
}
// Create a document
doc := Document{
Name: "Document A",
Description: "This is the description for document A",
}
// Index the document
if err := idx.Index("document-1", doc); err != nil {
log.Fatal(err)
}
// Success
log.Println("Successfully indexed document!")
}
- Build or run the main.go file.
or
Expected Behavior
The main.go file should compile or run without any errors.
Actual Behavior
Compilation fails and errors are encountered (shared above in error logs).
Environment
OS: Zorin OS 18.1
Go: 1.26.3
Belve: v2.6.0
Description
BoundingBoxmethod is missing for certain types in the github.com/blevesearch/geo/geojson dependency package.Replication Steps
go get github.com/blevesearch/bleve/v2@v2.6.0or
Expected Behavior
The main.go file should compile or run without any errors.
Actual Behavior
Compilation fails and errors are encountered (shared above in error logs).