Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Invalid characters in MC break search API

Open
#10 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start by reproducing the search request with the message containing control and zero-width characters, comparing the Python client's response with the working requests and ujson path shown in the issue. Trace how the client parses the search response and verify that the returned hits are exposed instead of becoming None.

Written by the indexing model from the issue text.

Description

Adding messages like this to MC seems to break the ability of the client to fetch them:
'msg': '[\x02L\u200bi\u200bl\u200bB\u200br\u200bu\u200bc\u200be\x02] sss'

Indexing with the client works fine:
{'error': None,
'items': [{'bulk': {'_id': 1370872170497990695,
'_index': 'main',
'created': 1,
'deleted': 0,
'result': 'created',
'status': 201,
'updated': 0}}]}

However, on search, these are the results:
{'took': None, 'timed_out': None, 'aggregations': None, 'hits': None, 'profile': None, 'warning': None}

In the server query log at the same time, I can see that this did in fact return results the client is not displaying.
/* Thu Sep 8 14:54:48.419 2022 conn 2 real 0.001 wall 0.002 found 73

Using requests seems to work:
response = requests.post(f"{settings.MANTICORE_URL}/json/search", json=search_query)
response = ujson.loads(response.text)

Dominant language
Python
Stars
62
Forks
6
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from manticoresoftware/manticoresearch-python

All issues in manticoresoftware/manticoresearch-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.