Skip to content

Default mode should be read only #43

Description

@mlissner

This is a small thing that I just discovered while looking at the code, but if you don't supply a mode parameter to your SolrInterface, you get a read/write interface by default. The code in the __init__ method is:

    if mode == 'r':
        self.writeable = False
    elif mode == 'w':
        self.readable = False

This is a design question, but I think this would be better if the default was read only. This would require people to create writable interfaces explicitly, which seems important.

This is a breaking API change, so we'll want to consider it carefully, but it seems like a good direction to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions