Skip to content

Commit

Permalink
MB-54131: Geoshape query decode optimization
Browse files Browse the repository at this point in the history
 - Added a buffer pool to be shared by all documents
  • Loading branch information
Likith101 committed Aug 8, 2023
1 parent 39394cd commit df9e61b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion search/searcher/search_geoshape.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func buildRelationFilterOnShapes(ctx context.Context, dvReader index.DocValueRea
var dvShapeValue []byte
var startReading, finishReading bool
var reader *bytes.Reader
var bufPool [][]byte
return func(d *search.DocumentMatch) bool {
var found bool

Expand Down Expand Up @@ -104,7 +105,7 @@ func buildRelationFilterOnShapes(ctx context.Context, dvReader index.DocValueRea
// apply the filter once the entire docvalue is finished reading.
if finishReading {
v, err := geojson.FilterGeoShapesOnRelation(shape,
dvShapeValue, relation, &reader)
dvShapeValue, relation, &reader, &bufPool)

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.18.x, ubuntu-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.18.x, macos-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.19.x, ubuntu-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.19.x, macos-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, ubuntu-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, macos-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.18.x, ubuntu-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.18.x, macos-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.19.x, ubuntu-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.19.x, macos-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, ubuntu-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation

Check failure on line 108 in search/searcher/search_geoshape.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, macos-latest)

too many arguments in call to geojson.FilterGeoShapesOnRelation
if err == nil && v {
found = true
}
Expand Down

0 comments on commit df9e61b

Please sign in to comment.