Project

General

Profile

Actions

Task #61204

closed

Change relevance sorting

Added by Andreas Kienast about 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2014-08-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently, the Extension Manager creates a virtual "position" field containing the relevance of a search hit. The relevance is calculated in a hacky way by casting the boolean of a LIKE (1=hit, 0=miss) into an integer by multiplying it with a specific number:

8 = exact match in extension_key
4 = partial match in extension_key
2 = partial match in title
1 = partial match in author_name

A query looks like this:
SELECT tx_extensionmanager_domain_model_extension.* ((extension_key like 'realurl') * 8 + (extension_key like '%realurl%') * 4 + (title like '%realurl%') * 2 + (author_name like '%realurl%')) as position FROM tx_extensionmanager_domain_model_extension WHERE (extension_key = 'realurl' OR extension_key LIKE '%realurl%' OR title LIKE '%realurl%' OR description LIKE '%realurl%' OR author_name LIKE '%realurl%') AND current_version = 1 AND review_state >= 0 HAVING position > 0"

When using DBAL, this crashes as hard as Wile E. Coyote.

BTW: Why is the keyword searched in "description" but does not take effect to the position?

Related: #60653


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #44711: SQL: No field name found as expected in parseFieldList()ClosedMorton Jonuschat2013-01-22

Actions
Actions #1

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32393

Actions #2

Updated by Gerrit Code Review about 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32393

Actions #3

Updated by Gerrit Code Review about 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32393

Actions #4

Updated by Gerrit Code Review about 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32393

Actions #5

Updated by Markus Klein about 10 years ago

Testing instructions:

Go to EM, "Get Extensions", search for "news" and check if it is listed first.

Actions #6

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32796

Actions #7

Updated by Andreas Kienast about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF