This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
1 month ago
3
Topic

Hi

What is your solutions to display your search lists by relevance please ?


For instance if you have a field1 in the search tab with the PERMISSIVE search criterion on it , if you type in 'ref' in the search form , the list will display:


1ref

ref

ref1

aref

...


but how can we order the list so that the EXACT matching items are displayed first and the LIKE matching items are displayed after to give :

ref

1ref

ref1

aref1


in other words, how can we define the ORDER BY SQL statement ?


thanks


Cyril



Get a VIP membership
4228 Posts
Kadministrator
1 month ago
0
Level 1

With the help of search query and similar plugins https://stackoverflow.com/questions/18725941/mysql-order-by-best-match

1 month ago
0
Level 1

Hi 

Thanks for the answer. We know the search query field but we expected to be able to osrt the list without this plugin because it forces you to rewrite the search & list

thanks

cyril

1 month ago
0
Level 1

Using https://www.seblod.com/resources/tutorials/using-the-search-query-field-plugin is the 

[MATCH] myfield ||$uri->getValue('myfield')[/MATCH]

really usgin the seblod match criteria (button 3) on the myfield field ? It seems it always perform a LIKE matching

thanks

Cyril

Get a VIP membership