Simple search with odd results

Just setting up Manticore having previously used Meili and I wanted to explore why I’m seeing some odd results.

The search has a title field and this is the example indexed content:

“$SOL MOCHICAT #1 Meme Coin Road too 1 Billion”

Given this is indexed, a search for ‘billion’ doesn’t return a result and neither does ‘road’ where a search for ‘meme’ or ‘coin’ does.

Also ‘1 Billion’ doesn’t or ‘Coin Road’

Can anyone explain why or what potentially needs to change? We’re using the PHP library and mysql instance if that helps.

Thanks

Hi @ritey. I can’t reproduce:

mysql> drop table if exists t; create table t(f text); insert into t values(0, '$SOL MOCHICAT #1 Meme Coin Road too 1 Billion'); select highlight() from t where match('billion'); select highlight() from t where match('road'); select highlight() from t where match('meme'); select highlight() from t where match('coin'); select highlight() from t where match('1 Billion'); select highlight() from t where match('Coin Road');
--------------
drop table if exists t
--------------

Query OK, 0 rows affected (0.01 sec)

--------------
create table t(f text)
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
insert into t values(0, '$SOL MOCHICAT #1 Meme Coin Road too 1 Billion')
--------------

Query OK, 1 row affected (0.00 sec)

--------------
select highlight() from t where match('billion')
--------------

+------------------------------------------------------+
| highlight()                                          |
+------------------------------------------------------+
| $SOL MOCHICAT #1 Meme Coin Road too 1 <b>Billion</b> |
+------------------------------------------------------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---

--------------
select highlight() from t where match('road')
--------------

+------------------------------------------------------+
| highlight()                                          |
+------------------------------------------------------+
| $SOL MOCHICAT #1 Meme Coin <b>Road</b> too 1 Billion |
+------------------------------------------------------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---

--------------
select highlight() from t where match('meme')
--------------

+------------------------------------------------------+
| highlight()                                          |
+------------------------------------------------------+
| $SOL MOCHICAT #1 <b>Meme</b> Coin Road too 1 Billion |
+------------------------------------------------------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---

--------------
select highlight() from t where match('coin')
--------------

+------------------------------------------------------+
| highlight()                                          |
+------------------------------------------------------+
| $SOL MOCHICAT #1 Meme <b>Coin</b> Road too 1 Billion |
+------------------------------------------------------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---

--------------
select highlight() from t where match('1 Billion')
--------------

+-------------------------------------------------------------+
| highlight()                                                 |
+-------------------------------------------------------------+
| $SOL MOCHICAT #<b>1</b> Meme Coin Road too <b>1 Billion</b> |
+-------------------------------------------------------------+
1 row in set (0.01 sec)
--- 1 out of 1 results in 0ms ---

--------------
select highlight() from t where match('Coin Road')
--------------

+------------------------------------------------------+
| highlight()                                          |
+------------------------------------------------------+
| $SOL MOCHICAT #1 Meme <b>Coin Road</b> too 1 Billion |
+------------------------------------------------------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---

Please provide a reproducible example.

Could the fact there is over 27 million records in the table have an affect?

Doing the same query via mysql has the same results as your test does but using the manticoresearch-php library is not.

Well the library use shouldnt really affect the results, nor should the size of the table.

To be honest it sounds like some sort of encoding issue when using the php library. You are inadvertently creating a different query. For example your code is adding some sort of other filter to the query.

If still having the issue, perhaps to dump the ‘raw’ query the library is running, see if it added some additonal query options.

Not used the libary much, but looks like can do something like
$body = $client->search(…)->compile()

ie use compile() instead of get() to get the raw query body that would be sent to server.