Avoid using deprecated Lucene APIs in internals

Description

Unless we expose the deprecated Lucene types on public APIs, we should stop using them.

There are several categories of such bad usage in the code base, so I'll create sub tasks to split this work up.

The test code needs to be polished as well, as the goal is to make it easier to eventually migrate to newer Lucene versions.

Environment

None

Status

Assignee

Unassigned

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major