5 years 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 Book for SEBLOD
4229 Posts
Kadministrator
5 years ago
0
Level 1

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

5 years 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

5 years 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