check for null term in PagedBytesEstimator.bytesPerValue()

Fixes #5326
This commit is contained in:
Lee Hinman 2014-03-04 10:18:13 -07:00
parent 9c7032c427
commit 2bcede168c
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ public class PagedBytesIndexFieldData extends AbstractBytesIndexFieldData<PagedB
* @return the number of bytes for the term based on the length and ordinal overhead
*/
public long bytesPerValue(BytesRef term) {
if (term == null) {
return 0;
}
long bytes = term.length;
// 64 bytes for miscellaneous overhead
bytes += 64;