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

ä, ü, ö not supported when filtering a discovery query #24

Open
LordHeImchen opened this issue Apr 30, 2024 · 0 comments
Open

ä, ü, ö not supported when filtering a discovery query #24

LordHeImchen opened this issue Apr 30, 2024 · 0 comments

Comments

@LordHeImchen
Copy link

Hi everyone,
currently I am trying to filter a natural language query to Watson Discovery by metadata-values. Everything works fine, except when the value I am trying to filter for contains ä, ü or ö... Probably there are some other cases that would fail as well.

So in Python, my function looks like this:

def query_discovery(tender, query):
    queryresult = discovery.query(
        collection_ids=[DISCOVERY_COLLECTION_ID],
        project_id=DISCOVERY_PROJECT,
        return_=["passage_text"],
        filter=f'metadata.tender::{tender}',
        natural_language_query=query,
        passages=QueryLargePassages(max_per_document=1, per_document=True),
    ).get_result()
    return queryresult

When I query it with any query and tender="Frankfurt" it works. However, using the value tender="München" will always result in zero outputs. I also tried to accomplish it using a curl command, but same issue. Additionally I tried to use the unicode for the ü, so basically I provided this value tender="M\u00fcnchen", but this will throw an error because of the \.

FYI:

  • The project-language of the corresponding Watson Discovery project is set to german.
  • It seems like the natural_language_query can handle ä, ü and ö

Is there any way to resolve this?

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

No branches or pull requests

1 participant