Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for lucene escaping of wildcard #207

Closed
wants to merge 1 commit into from
Closed

Fix for lucene escaping of wildcard #207

wants to merge 1 commit into from

Conversation

nickmasster
Copy link

Fix for the issue #205.

Probably, there are other servers based on MusicBrainz where escaping is properly supported.

So I've added a method to enable full lucene escaping. By default there's no escaping of wildcard chars. Also fixed the issue in strict mode.

@alastair
Copy link
Owner

alastair commented Dec 2, 2016

Thanks for this patch.
Please make sure you use -s to sign off commits (https://github.com/alastair/python-musicbrainzngs/blob/master/CONTRIBUTING.md)

I wonder if a global setting is the best way to do this configuration. Another option would be to have it as a per-method flag for each search method. e.g.

def search_artists(query='', limit=None, offset=None, strict=False, escape_wildcards=False, **fields):

where the escape_wildcards field chooses this setting.

We could also consider whether this is actually the incorrect behaviour for the API and wildcards should never be escaped. We could change the documentation to remind users to escape any use of wildcards manually. This however would be a breaking API change.

@alastair alastair added this to the 0.8 milestone Jan 9, 2020
@nickmasster nickmasster closed this Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants