[TYPO3-dev] technical Problems / Questions building AJAX BE-Search based on ExtJS

Steffen Ritter info at rs-websystems.de
Thu Mar 26 14:39:21 CET 2009


Hi list,
I recently started to build a new (sys)ext "besearch" as a replacement 
of the current search in backend toolbar.

It's based on the ExtJS Combobox[1] Forum Search Example.

I started of with a simple "what's possible" example.
My current state is, that I'm able to search tt_content records (using 
t3lib_db::searchQuery). Since this Kickoff shows that "it is possible", 
the full implementation faces some "problems" I would like to have 
cleared... Furthermore, if there are "feature requests" which might be 
"extravagant" they should be pointet out, so that structure of the new 
tool is able to handle that.

Hope to get some constructive input...

First Topic: Translated Labels in JS
--------------------------------------
There have to be labels defined in JS. Hardcoded labels won't respect 
translation. So my thoughts were about implementing an JS-Function/ajax 
Handler for TYPO3 in general like getLL('LLL:EXT:besearch/bla'); which 
is able to return translated labels into JS variables (probably cached 
by extJS to prevent "double calls").
Or is there already some kind of such functionality, so that this would 
not make sence? And if you think it does not make sence, how to deal 
with translated labels in JS at all?


Second Topic: Representing Skinning API in JS
-----------------------------------------------
Since "templates" for ExtJS rendering of dynamic Data is placed in the 
JS file, how to "access" the skinning API. For example "Icons", in PHP I 
easely can get Icons for for Edit, Delete etc. In JS I would also need 
Some API which would allow to get Information about the optics in JS. 
Could be a System like suggested in Translating, but also could be a php 
Script with JS output granting all Informationn needed in JS arrays.
Are therre already any results or thoughts about this topic?

Third Topic: "Search Quality"/"Search algorithm"
----------------------------------------------------
We all know, the current search does not match quite well.
What kind of search algorithm shoudl be used? How should the queris look 
like?
Things with I think we have to take care of:
  - only fields and tables the user has reading access to, should be 
searched (and not only hidden in rendering)
  - all text fields should be searched
  - how to decide if a "table" should be searched or not...
  - search query building in t3lib_db ist not very efficient and some 
kind unhandy...
  - how te be efficient without building indexes in separate tables
  - currently spaces are handled like "AND", I think normally spaces 
should result to OR, and we should enable "" AND and OR keywords in search.

Fourth Topic: Hot-Key
----------------------
There where plans to implement an Hot-Key API, how far is it? Heared 
Steffen Kamper was into it... I would like to introduce an Hotkey for 
opening the search... Should I register the Hot-Key myself or  stay 
tuned, since the HotKey Api soon will have "testable" results.


I planned to introduce search Options...
There are to types of options:
options like: only sys_folders, only pages, current page (and 
additionally restrict to current page tree in multisite envirements)

Further more there should be a "preset" possibility. So that in TS 
(user/group) search presets may be pre-defined like (search in name of 
fe_users in sys_folder xy or search bodytext,header in tt_content with 
colPos=0)

I think all these advanced stuff like options hast to be done in a 
second step, but should stay in mind while building the search...


I really would like do dig into it deeper and present "usable" results 
end of next week... This is why I highly would appreceate your ideas and 
thoughts to the topics.
Since I am not the best in JS any one is welcome who wants to join this 
project and the currently "one-man" team.

thanks in advance

Steffen Ritter


[1] http://extjs.com/deploy/dev/examples/form/forum-search.html




More information about the TYPO3-dev mailing list