Webboard: Substring search

[email protected]
Newsgroups gmane.comp.web.mnogosearch.general
Message-ID <[email protected]>
Author: Alexander Barkov
Email: [email protected]
Message:
> I don't know if that works as designed or unintentionally:

> 

> With an UDM_MATCH_SUBSTR word match records having a subtring as a whole word will get a lower score than records having words containing the substring.



mnoGoSearch does not distinguish between full and substring

matches when UDM_MATCH_SUBSTR is specified. So both generate

the same score.



The difference most likely comes from some other document

parameters, such as word density, document size, and so on.



Have a look here to see the list of parameters affecting score:

http://www.mnogosearch.org/doc33/msearch-rel.html#score-commands



> 

> I.e.:

> The body section of record1 contains the word "Wochentage".

> The body section of record2 contains the word "Woche".

> 

> When I start a search query with "Woche" record1 will get a higher score than record2.

> The difference is very small (0.0X %) but I would expect that record2 has a slightly significant higher score than record1.

> 

> I've done a lot of tests and the same thing happens with other records and with other words/substrings. All strings I used in the tests hadn't synonym words.

> 

> Here's the param set I use (only relevant params):

> 

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_WORD_MATCH, UDM_MATCH_SUBSTR);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'SubstringMatchMinWordLength', '2');

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'WordDensityFactor', 5);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'StrictModeThreshold', '1');

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'IspellUsePrefixes', 'yes');

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'WordFormFactor', 0);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'MinWordLength', 2);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'MaxWordLength', 64);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'DateFactor', 0);

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_SEARCH_MODE, UDM_MODE_ALL);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'IDFFactor', '40');

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_DETECT_CLONES, UDM_DISABLED);

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_PHRASE_MODE, UDM_ENABLED);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'PopRankUseShowCnt', 'no');

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'ExcerptSize', 384);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'ExcerptPadding', 20);

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_GROUPBYSITE, UDM_DISABLED);

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_MIN_WORD_LEN, 2);

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_MAX_WORD_LEN, 64);

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_WEIGHT_FACTOR, "00F8");

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'nwf', "0000");

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'MinCoordFactor', 0);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'NumWordFactor', 10);

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'DocSizeWeight', 0);

> 	$res = Udm_Set_Agent_Param($udmAgent, UDM_PARAM_SORT_ORDER, 'R');

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'suggest', 'yes');

> 	$res = Udm_Set_Agent_Param_Ex($udmAgent, 'sp', '1');

> 

> WordFormFactor on the other side works great for original/fuzzy word forms.

> 

Reply: <http://www.mnogosearch.org/board/message.php?id=21077>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.