Hello!
→ mysql -h0 -P9306 -e "select id from items where MATCH ('test')"
+--------+
| id |
+--------+
| 74824 |
| 97637 |
| 137270 |
| 4960 |
| 13111 |
| 13264 |
| 13265 |
| 13454 |
| 13785 |
| 14268 |
| 14777 |
| 15258 |
| 15491 |
| 15997 |
| 17199 |
| 21873 |
| 22067 |
| 22242 |
| 22537 |
| 22798 |
+--------+
but when I run python script I get different output:
import manticoresearch
from manticoresearch import *
configuration = manticoresearch.Configuration(
host="http://127.0.0.1:9308"
)
with manticoresearch.ApiClient(configuration) as api_client:
api_instance = manticoresearch.SearchApi(api_client)
search_request = SearchRequest()
search_request.index = 'items'
search_request.fullltext_filter = QueryFilter('test')
try:
api_response = api_instance.search(search_request)
row = api_response.to_dict()
row = row['hits']['hits']
for i in row:
print(i['_id'])
except manticoresearch.ApiException as e:
print("Exception when calling SearchApi->search: %s\n" % e)
I get:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20