Task #26829

Improve Backend search

Added by Dmitry Dulepov about 4 years ago. Updated about 2 years ago.

Status:Closed Start date:2011-05-16
Priority:Should have Due date:
Assigned To:Dmitry Dulepov % Done:

100%

Category:Backend User Interface Spent time: -
Target version:-
TYPO3 Version:4.6 Complexity:
PHP Version:5.3 Sprint Focus:

Description

There are several problems with current Backend search:
  • it searches far more fields than necessary (for example, TSConfig)
  • it searches "uid" and other numeric fields even if the value is not numeric
  • it uses LIKE x search on numeric fields
  • it searches all tables even if they do not make sense to be searched
  • it is too slow
  • it searches only first four levels deep in the page tree

All these problems come from the [wrong] idea that TYPO3 can detect where it can search. Instead, tables should be marked as "searchable" and provide a list of fields that make sense to search. Also it makes sense to search some fields as case insensitive.

The attached patch improves backend search using ideas above. It is made over git revision 69fb8866b94c75b3b73395cfa4bd0a900e6ab53c (May 10, 2011).

When applying the patch, use -p1 argument (git diff makes patches that require -p1).

search-trunk.diff Magnifier (21.8 kB) Dmitry Dulepov, 2011-05-16 11:03


Related issues

related to Core - Bug #31761: Live search does not implement search properties Resolved 2011-11-11

Associated revisions

Revision 7b3d5b97
Added by Dmitry Dulepov about 4 years ago

[TASK][!!!] Improve Backend search

There are several problems with current Backend search:
  • it searches far more fields than necessary (for example, TSConfig)
  • it searches "uid" and other numeric fields even if the value is not
    numeric
  • it uses LIKE x search on numeric fields and forces DAM to make an
    XCLASS
  • it searches all tables even if they do not make sense to be searched
  • it is too slow
  • it searches only first four levels deep in the page tree

All these problems come from the [wrong] idea that TYPO3 can detect
where it can search. Instead, tables should be marked as "searchable"
and provide a list of fields that make sense to search. Also it makes
sense to search some fields as case insensitive. This task solves all
described issues.

After this change extensions will need to explicitely mark their tables
as searchable. Until that, those table will not be searched.

Search by default is NOT case sensitive. If the developer wants a case
sensitive search on the column, (s)he should ensure proper locale on
that column (as described at http://bit.ly/1zw8dC) and mark the column
as case-sensitive for search (see TYPO3 core API for more details).

Change-Id: I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8
Resolves: #26829
Releases: 4.6
Reviewed-on: http://review.typo3.org/2189
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Markus Klein
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Kay Strobach
Tested-by: Kay Strobach
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
Reviewed-by: Xavier Perseguers

History

#1 Updated by Mr. Hudson about 4 years ago

Patch set 1 of change I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8 has been pushed to the review server.
It is available at http://review.typo3.org/2189

#2 Updated by Mr. Hudson about 4 years ago

Patch set 2 of change I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8 has been pushed to the review server.
It is available at http://review.typo3.org/2189

#3 Updated by Oliver Hader about 4 years ago

  • Target version changed from 1238 to 1281

#4 Updated by Mr. Hudson about 4 years ago

Patch set 3 of change I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8 has been pushed to the review server.
It is available at http://review.typo3.org/2189

#5 Updated by Dmitry Dulepov about 4 years ago

  • Category set to Backend User Interface
  • Status changed from New to Under Review
  • Assigned To set to Dmitry Dulepov
  • % Done changed from 30 to 90
  • PHP Version set to 5.3

The patch attached here is no longer relevant. Please, get the patch from http://bit.ly/k7LeXT

#6 Updated by Mr. Hudson about 4 years ago

Patch set 4 of change I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8 has been pushed to the review server.
It is available at http://review.typo3.org/2189

#7 Updated by Mr. Hudson about 4 years ago

Patch set 5 of change I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8 has been pushed to the review server.
It is available at http://review.typo3.org/2189

#8 Updated by Mr. Hudson about 4 years ago

Patch set 6 of change I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8 has been pushed to the review server.
It is available at http://review.typo3.org/2189

#9 Updated by Mr. Hudson about 4 years ago

Patch set 7 of change I2b194dc1c746a4fc3f7663358ed08d7c9f6e11a8 has been pushed to the review server.
It is available at http://review.typo3.org/2189

#10 Updated by Dmitry Dulepov about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100

#11 Updated by Xavier Perseguers over 3 years ago

  • Status changed from Resolved to Closed

#12 Updated by Ernesto Baschny about 2 years ago

  • Target version deleted (1281)

Also available in: Atom PDF