Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-31358: Estimation of memory needed for query with highlighting
+ Check this test .. ``` func TestEstimate(t *testing.T) { q := []byte(`{"from":8996,"highlight":{},"query":{"bool":false,"field":"free_parking"},"size":405}`) var sr *SearchRequest err := json.Unmarshal(q, &sr) if err != nil { t.Fatal(err) } x := MemoryNeededForSearchResult(sr) fmt.Println(x) } ``` + For the query, the MemoryNeededForSearchResult API claims that it needs .. 6363433784 bytes (that's over 6GB!). + Fixing the size calculation estimate when the query requests for "fields" to be returned or "highlighting", basing the number of results returned on the collector's PreAllocSizeSkipCap.
- Loading branch information