Query Suggestion Options
Last word completion
Keyboard Layouts
GitHub

👀 While it's loading, feel free to check out the other repositories:

🔔 To get a notification when it's ready, leave your email here:

By entering your email, you agree to receive notifications and marketing-related emails

Filter by reset

86 results 26 ms in manticoresoftware/manticoresearch-python

Implemented the composite aggregation feature

Nick-S-2018Nick-S-2018 · 2024-04-13 · 0 · #13

Unexpected truncate if text contains null char `\x00`

scruelscruel · 2024-10-01 · 4 · #18

bug

…mre: curl -sX POST http://localhost:9312/insert -d '{"index":"test","id":1,"doc":{"title":"a\u0000sdfg"}}' (python internally subsitutes \x00 into \u0000 and send resulting line to manticore). Manticure uses lib 'cjson' to parse incoming json. That is …

klirichekklirichek · 2024-09-24

Update UtilsApi.md

The configuration object is missing in line 38. It should be a parameter for ApiClient.

jonyrjonyr · 2022-02-03 · 1 · #5

Unexpected truncate if text contains null char `\x00`

scruelscruel · 2024-10-01 · 4 · #18

bug

@scruel When you do doc = {"index": table_name, "id": 1, "doc": {"title": 'a\x00sdfg'}} What do you mean? Do you want the string to be stored in Manticore including the null byte or you mean that the string should be stored exactly as a\x00sdfg (without …

sanikolaevsanikolaev · 2024-09-25

Test

Nick-S-2018Nick-S-2018 · 2024-10-21 · 0 · #19

Unexpected truncate if text contains null char `\x00`

scruelscruel · 2024-10-01 · 4 · #18

bug

@sanikolaev including the null byte, we currently have to remove all \x00 byte from the text.

scruelscruel · 2024-10-01

Ability to get document via `indexAPI.get`

Currently, I can only filter with searchAPI to get the document via its ID or field, I wonder if you could let indexAPI provide a more easy way to do so.

scruelscruel · 2024-03-21 · 9 · #12

Unexpected truncate if text contains null char `\x00`

scruelscruel · 2024-10-01 · 4 · #18

bug

I've added to the documentation that Manticore string/text fields are not meant for storing binary data. If you need to store binary data, you can base64-encode it (by the way, Elasticsearch requires the same approach as mentioned here). I'll close this …

sanikolaevsanikolaev · 2024-10-01

How to filter by the keys of JSON type field?

…>>> utilsApi.sql(f"CREATE TABLE testx(title text, infos json) morphology='stem_en'") >>> indexApi.insert({"index": "testx", "doc": { "title": "test", 'infos': {-1: 1, -2: 1, -3: 2}}}) >>> search_res = searchApi.search( SearchRequest(index="testx", query …

scruelscruel · 2024-05-06 · 3 · #15

How to filter by the keys of JSON type field?

scruelscruel · 2024-05-06 · 3 · #15

Your should use the following syntax: utilsApi.sql(f"CREATE TABLE testx(title text, infos json) morphology='stem_en'") indexApi.insert({"index": "testx", "doc": { "title": "test", "infos": { "a": 1, "b": {"c":2}, "z":3 }}}) search_req = SearchRequest( …

Nick-S-2018Nick-S-2018 · 2024-04-30

`UtilsApi` will return MVA type list value as string

According to your document: https://manual.manticoresearch.com/Creating_a_table/Data_types#Multi-value-integer-(MVA) We will be able to obtain a list for MVA type value. However, by using UtilsApi to query the index, it won't act as the same: >>> utilsApi …

scruelscruel · 2024-05-07 · 5 · #14

How to filter by the keys of JSON type field?

scruelscruel · 2024-05-06 · 3 · #15

@Nick-S-2018 Hi, thanks for your answer, however you didn't answer what this issue is asking and what I want, let me clarify it more. For index: utilsApi.sql(f"CREATE TABLE testx(title text, infos json) morphology='stem_en'") indexApi.insert({"index": " …

scruelscruel · 2024-05-04

Question about `query` and `filter`s field.

What is the purpose of fulltext_filter and attr_filter ? It seems that your documentation didn't contain such related info about them: Furthermore, I would like to know what is the difference between the following code snippets: search_req = SearchRequest …

scruelscruel · 2024-06-13 · 3 · #16

est::size_S

How to filter by the keys of JSON type field?

scruelscruel · 2024-05-06 · 3 · #15

@scruel SQL: mysql> drop table if exists testx; CREATE TABLE testx(title text, infos json) morphology='stem_en'; insert into testx(infos) values('{ "a": 1, "b": {"c":2}, "z":3 }'),('{ "x": 1, "d": {"c":2}, "z":3 }'); select * from testx where infos.x is …

sanikolaevsanikolaev · 2024-05-06

1👍1

Unsupported value type check only works with `None`

…>>> utilsApi.sql(f"CREATE TABLE testx(num bigint)") [{'total': 0, 'error': '', 'warning': ''}] >>> indexApi.insert({"index": "testx", "doc": {'num': None}}) ... manticoresearch.exceptions.ApiException: (400) Reason: Bad Request HTTP response headers: …

scruelscruel · 2024-06-17 · 1 · #17

est::size_S

`UtilsApi` will return MVA type list value as string

scruelscruel · 2024-05-07 · 5 · #14

@Nick-S-2018 pls check why the client returns {'product_codes': {'type': 'string'}} in this case. I can't reproduce via JSON: ➜ ~ mysql -P9306 -h0 -e "drop table if exists products; CREATE TABLE products(title text, product_codes multi); insert into …

sanikolaevsanikolaev · 2024-04-30

Unexpected truncate if text contains null char `\x00`

import manticoresearch table_name = 'test' manticoresearch_config = manticoresearch.Configuration( host="http://127.0.0.1:9308") manticoresearch_client = manticoresearch.ApiClient(manticoresearch_config) utilsApi = manticoresearch.UtilsApi(manticoresearch …

scruelscruel · 2024-10-01 · 4 · #18

bug

`UtilsApi` will return MVA type list value as string

scruelscruel · 2024-05-07 · 5 · #14

@sanikolaev The issue can be reproduced by calling the /sql?mode=raw endpoint which is what the client does internally. However, the multi type (as well as multi64 g or json ) is actually returned as string in sql queries, so we need to discuss this case …

Nick-S-2018Nick-S-2018 · 2024-05-02

Is there a complete introduction to `dsl` for http requests?

For example. I want to know how many tables are there. I will run import manticoresearch config = manticoresearch.Configuration( host = "http://127.0.0.1:9308" ) client = manticoresearch.ApiClient(config) indexApi = manticoresearch.IndexApi(client) …

sangensongsangensong · 2021-05-07 · 3 · #2

waiting for reply

`UtilsApi` will return MVA type list value as string

scruelscruel · 2024-05-07 · 5 · #14

@Nick-S-2018 Such auto-conversion already implemented in searchApi , why not let utilsApi also utilize it?

scruelscruel · 2024-05-04

利用SQL进行multi-query

利用SQL进行multi-query,怎么获取批量查询的结果?

lljqylljqy · 2023-07-19 · 10 · #4

`UtilsApi` will return MVA type list value as string

scruelscruel · 2024-05-07 · 5 · #14

Blocked by https://github.com/manticoresoftware/manticoresearch/issues/2143

sanikolaevsanikolaev · 2024-05-07

add missing import statement in IndexApi.md code snippet

hi this is just a small change to make all the code snippets in IndexApi.md runnable

joshuakosasihjoshuakosasih · 2022-09-05 · 2 · #9

`UtilsApi` will return MVA type list value as string

scruelscruel · 2024-05-07 · 5 · #14

@scruel searchApi and utilsApi use different API endpoints on the server side so they operate with different response formats

Nick-S-2018Nick-S-2018 · 2024-05-07

bulk insert error

Hear is my code import json import platform import manticoresearch import time import csv import _csv os = platform.platform() datapath = "hacker_news_comments.csv" if not os.startswith("Linux") else "/home/fake_data/hacker_news_comments.csv" docs = [] …

sangensongsangensong · 2021-04-20 · 6 · #1

waiting for reply

Question about `query` and `filter`s field.

scruelscruel · 2024-06-13 · 3 · #16

est::size_S

attr_filter lets you add search conditions based on attribure values. fulltext_filter adds conditions for full-text search. It overwrites conditions set with query if such exist. So, in your first example the search will be performed only by the "title= …

Nick-S-2018Nick-S-2018 · 2024-06-12

1👍1

SearchApi seems to generate a wrong endpoint

…Hi, I want to try the Python API, but I couldn't send a SearchRequest to localhost. On every request, I'm getting: Exception when calling SearchApi->search: (501) Reason: Not Implemented HTTP response headers: HTTPHeaderDict({'Server': '3.6.0 96d61d8@ …

akordeckiakordecki · 2021-07-09 · 4 · #3

Question about `query` and `filter`s field.

scruelscruel · 2024-06-13 · 3 · #16

est::size_S

Thanks for your answer, which way will be disabled? fulltext_filter or attr_filter ?…

scruelscruel · 2024-06-12

UtilsApi.sql fails with `{"error":"query missing"}` but query works in mysql

Example query fails when called via UtilsApi.sql in python client with {"error":"query missing"} but same query works in mysql client. Steps to reproduce: import manticoresearch configuration = manticoresearch.Configuration(host="http://127.0.0.1:9308") …

narayanacharya6narayanacharya6 · 2022-04-07 · 1 · #8

Question about `query` and `filter`s field.

scruelscruel · 2024-06-13 · 3 · #16

est::size_S

Both of them.

Nick-S-2018Nick-S-2018 · 2024-06-13

1👀1

Update README.md

sanikolaevsanikolaev · 2024-01-23 · 0 · #11

est::size_S

Unsupported value type check only works with `None`

scruelscruel · 2024-06-17 · 1 · #17

est::size_S

We've created another issue based on your question and closed this one.

Nick-S-2018Nick-S-2018 · 2024-06-17

Encoding issue with UtilsApi sql method when using UTF-8 charset

When trying to use the UtilsApi to send some SQL to manticore server the query is sent as plain text in the body. This runs into encoding issues if your query contains non ISO-8859-1 (or latin-1 ) characters because when your request body is str or bytes …

narayanacharya6narayanacharya6 · 2022-02-24 · 4 · #6

bug

SearchApi seems to generate a wrong endpoint

akordeckiakordecki · 2021-07-09 · 4 · #3

Fixed in https://github.com/manticoresoftware/manticoresearch-python/commit/9c340ac6fc2d351f86e104071a65c8ea7c62cc20. Closing the issue

sanikolaevsanikolaev · 2021-07-09

Documentation lacking for SearchRequest parameters

I'm new to manticoresearch and manticoresearch-python and I am looking for more detailed documentation for the arguments in the SearchRequest constructor. I noticed that the "match" in the HTTP query is not equivalent to the the MATCH in the SQL syntax. …

narayanacharya6narayanacharya6 · 2023-04-20 · 8 · #7

bug

利用SQL进行multi-query

lljqylljqy · 2023-07-19 · 10 · #4

This works fine for me: snikolaev@dev:~$ cat manticore.py import datetime import mysql.connector cnx = mysql.connector.connect(host='127.0.0.1', port='9306') cursor = cnx.cursor() cursor.execute("drop table if exists t") cursor.execute("create table t(f …

l1t1l1t1 · 2023-07-19

Invalid characters in MC break search API

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': …

syxiesyxie · 2022-09-13 · 3 · #10

Encoding issue with UtilsApi sql method when using UTF-8 charset

narayanacharya6narayanacharya6 · 2022-02-24 · 4 · #6

bug

I've tested the issue with the current dev build - it's fixed there.

Nick-S-2018Nick-S-2018 · 2022-02-24

Documentation lacking for SearchRequest parameters

narayanacharya6narayanacharya6 · 2023-04-20 · 8 · #7

bug

This python client is based on Manticore HTTP JSON protocol, it doesn't natively support ranker=... as well as other search options, so you are right - you need to use sql method for that. We'll look into the other issues

sanikolaevsanikolaev · 2022-02-23

1👍1