-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
Can't index name be written in Hump? #711
Comments
In general index names in Manticore are lowercased, the only exception is a plain index. I assume you use a plain index. As said in the docs https://manual.manticoresearch.com/Creating_an_index/Local_indexes#Defining-index-schema-in-config-(Plain-mode)
but when you use Manticore PHP client (which is my 2nd assumption) it uses HTTP JSON protocol which lowercases index name in your request. |
OK, thank you for your answer. There are two other questions, please.
The body I submitted is as follows: |
But there's a workaround - https://github.com/manticoresoftware/manticoresearch-php/blob/master/docs/sql.md + https://mnt.cr/field_weights + https://manual.manticoresearch.com/Searching/Highlighting?client=SQL#Highlighting |
thank you for your help. I have realized field_ Weights configuration, but when running through SQL, highlight is still empty. Do I need to configure any parameters? My SQL: I'm very sorry to trouble you again |
I can't reproduce it: mysql> drop table if exists goods_search; create table goods_search(title text, content text); insert into goods_search(title) values('smth key smth'); SELECT *,HIGHLIGHT() as highlight FROM goods_search where MATCH('key') limit 0,20 OPTION ranker=sph04, max_matches=3000, field_weights=(title=10, content=3);
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 1 row affected (0.00 sec)
+---------------------+---------------+---------+----------------------+
| id | title | content | highlight |
+---------------------+---------------+---------+----------------------+
| 1514688521527361537 | smth key smth | | smth <b>key</b> smth |
+---------------------+---------------+---------+----------------------+
1 row in set (0.01 sec) Provide more details on how to reproduce the issue. |
Data: external MySQL data
MySQL running result:
PS: the data contains Chinese data and English data, but I have tested both data without highlight. I don't know what's wrong with me... |
Both the title and content field types are text.
|
Since the index is plain it's not enough. Type You need to add:
to the index. More info here https://manual.manticoresearch.com/Creating_an_index/Local_indexes/Plain_and_real-time_index_settings#stored_fields |
I see. Thank you very much for your answer. |
I created an index with a hump like goodsSearch.
When I use PHP, I set the index name in the parameter,
The result returns a prompt: "unknown local index (ES) 'goodssearch' in search request"
The text was updated successfully, but these errors were encountered: