See AbstractVisitingPrefixTreeFilter.AbstractVisitingPrefixTreeFilter(IShape, string, SpatialPrefixTree, int, int). queryBuffer is the (minimum) distance beyond the query shape edge where non-matching documents are looked for so they can be excluded. If -1 is used then the whole world is examined (a good default for correctness).