manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
9.11k stars 509 forks source link

exact form modified vs expanded keywords #465

Open sanikolaev opened 3 years ago

sanikolaev commented 3 years ago

Currently exact form modified = doesn't prevent expanding keywords, e.g.:

mysql> drop table if exists t;create table t(f text) min_infix_len='1' expand_keywords='1'; insert into t values(1,'abc'),(2,'bc');  
mysql> select * from t where match('=bc');  
 ------ ------   
| id   | f    |  
 ------ ------   
|    2 | bc   |  
|    1 | abc  |  
 ------ ------   
2 rows in set (0.00 sec)  
mysql> show meta;  
 --------------- -------   
| Variable_name | Value |  
 --------------- -------   
| total         | 2     |  
| total_found   | 2     |  
| time          | 0.002 |  
| keyword[0]    | *bc*  |  
| docs[0]       | 2     |  
| hits[0]       | 2     |  
| keyword[1]    | bc    |  
| docs[1]       | 1     |  
| hits[1]       | 1     |  
 --------------- -------   
9 rows in set (0.00 sec)  

It would be good to fix it.

githubmanticore commented 3 years ago

➤ Stan commented:

also need to check wildcard modifiers, ie term? not get replaced by *term*

glukkkk commented 3 years ago

@sanikolaev @githubmanticore

Hello! Any news?

sanikolaev commented 3 years ago

No news. This task is not in our nearest plans, but we'll be happy to review and accept a pull request.

glukkkk commented 3 years ago

@sanikolaev Maybe there is some workaround for this?

sanikolaev commented 3 years ago

expand_keywords=0 ?

sanikolaev commented 3 years ago

Or expand_keywords=exact

glukkkk commented 3 years ago

@sanikolaev In fact we need to keep expand_keywords = 1, but have the ability to search by exact phrase.

sanikolaev commented 3 years ago

Can't think of another workaround.

glukkkk commented 3 years ago

@sanikolaev Hello! Half a year has passed :) Maybe you have any good news for me?

sanikolaev commented 3 years ago

Hello @glukkkk

Sure, the good news are that:

All these tasks were of a higher priority for us since we believe it's more important for the community at the moment or someone wanted to sponsor development of some of these features, which allowed us to sustain the development in general. Unfortunately, this issue is of a lower priority and will be so until we are done with more important things or until someone makes a merge request. Thank you for your understanding.