I found this useful while working with spans recently. It's simple and straightforward. I'll add a patch shortly.
Trivial patch. I couldn't decide between FilterSpans and SpansWrapper - any preferences?
Not plural; existing span queries are "...Span...". I guess I like SpanQueryWrapper. "Wrapper" appears often in our classes.
Spans is not plural, it's the name of the class Spans . This one wraps/filters a Spans impl, not SpanQuery. Therefore the decision would be between FilterSpans and SpansWrapper. I have no strong feelings about either. I used Filter since we have that in FilterDirectory and FilterAtomicReader
Ah, I see Either name is fine.
Commit 1624327 from Shai Erera in branch 'dev/trunk'
[ https://svn.apache.org/r1624327 ]
LUCENE-5933: add FilterSpans
Commit 1624329 from Shai Erera in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1624329 ]
Committed to trunk and 4x
Commit 1624358 from Shai Erera in branch 'dev/trunk'
[ https://svn.apache.org/r1624358 ]
LUCENE-5933: fix eol-style
Commit 1624359 from Shai Erera in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1624359 ]
Bulk close after 5.0 release.