Exact form modifier


#1

I need to find out PHP instead of xxxphpxxx.
select * from test1 where match(’@title ^php$’);
select * from test1 where match(’@title =“php”’);
select * from test1 where match(’@title =php’);

but I find these methods do not work.


#2

=php should work. What index settings you have? And what SHOW META says?


#3

no work.
select * from test1 where match(’@keyword=php’);
still return xxphpxx results

MySQL [(none)]> SHOW META;
±--------------±------+
| Variable_name | Value |
±-------------- ±------+
| total | 729 |
| total_found | 729 |
| time | 0.000 |
| keyword[0] | php |
| docs[0] | 729 |
| hits[0] | 730 |
±--------------±------+
6 rows in set (0.00 sec)


#4

select * from test1 where match(’@keyword=php’);

is missing a space before the =

do you have index_exact_words=1 enabled on the index?


#5

still no work.
select * from test1 where match('@title =php');

index test1
{
	source			= src1
	path			= /manticore/data/test1
	charset_table   = 0..9, english
	morphology = none
	index_exact_words = 1
}

indexer.exe --config manticore\sphinx-min.conf.in --all
Manticore 2.7.0 3d60c8e@180611 release
Copyright © 2001-2016, Andrew Aksyonoff
Copyright © 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright © 2017-2018, Manticore Software LTD (http://manticoresearch.com)

using config file ‘manticore\sphinx-min.conf.in’…
indexing index ‘test1’…
WARNING: index ‘test1’: no morphology or wordforms, index_exact_words=1 has no effect, ignoring
collected 201007 docs, 1.0 MB
sorted 0.0 Mhits, 100.0% done
total 201007 docs, 1024203 bytes

my requirement is to find out the “php”, do not need a word segmentation, can you provide a configuration?
it’s best to use cjk.


#6

In SHOW META you have | keyword[0] | php |, means exact php is matched, not xxxphpxxx (which couldn’t be matched as you don’t have prefix/infix enabled). Your matched records probably have xxxphpxxx also beside php.