Skip to content

Remove declared IOException in LeafReader methods that should not be doing I/O #16052

@iverase

Description

@iverase

Some APIs in LeafReader declared throws IOException even though, in Lucene’s own implementations they are actually not doing any I/O and probably should never do I/O. They provide quick access to some already load metadata for quickly decide if the index needs to be searched or not.

It is difficult to tell from a developer point of view which methods are doing I /O and which are not because everything throws IOException. Therefore the proposal here is to remove the declared IOException from methods that should not be doing I/O.

In particular I am thinking in this two methods, there might be more:

public abstract PointValues getPointValues(String field);

public abstract Terms terms(String field);

This is changing a public API so it should be a lucene 11 change only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions