[TYPO3-v4] Improving/changing BE search

Dmitry Dulepov dmitry.dulepov at gmail.com
Sun May 1 11:08:07 CEST 2011


Hi!

Recently I came over major issues with BE search in one of my private 
projects and I have an idea to change how BE search works. Since I have two 
options (do it locally or for everybody), I want to know if the community 
is ok with my idea or not.

== Why current BE search is bad? ==

Firsts, it searches very badly for non–English texts. Often searching for 
words with umlauts does not find them.

Secondly, the search searches all input/text fields + uid field (even if 
the search string is not number) in all tables using "LIKE '%word%'" 
syntax, which is very slow and does not use any indexes. With 50+ tables it 
becomes too slow and there is too much junk in search results.

I believe that this happens because TYPO3 tries to figure out where and how 
it can search. So it just searches all possible fields.

I propose to change that completely.

== How to fix the search? ==

Firsts, it should search uid field using equals operator only if the search 
string is a number. Search any other 'int' fields using "equals" search only.

Secondly, it should only search tables and fields that are explicitly 
marked as searchable. This would break search for extension tables that are 
not marked as such but it would improve search quality in general. For the 
core, we would mark tables like that in the core, so no functionality 
change here.

Thirdly, field should be able to specify how to search it. For example, it 
could have a collation and case sensitivity options specially for search. 
Also things like search only from the beginning should be considered.

In my opinion this would improve both search quality and speed.

What does the community think? Would that be acceptable enhancement for a 
common use?

-- 
Dmitry Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/


More information about the TYPO3-project-v4 mailing list