[TYPO3-english] Tesseract: Multiple complex filters
François Suter
fsu-lists at cobweb.ch
Sun Aug 14 17:40:00 CEST 2011
Hi Hauke,
> I like the Tesseract concept ( http://www.typo3-tesseract.com/en/ ).
Thanks ;-)
> Unfortunately it does not allow own SQL statements - they will be parsed
> with a quite simple parser.
The dataquery extension indeed uses a rather simple parser. The reason
is quite simple: we couldn't find any good PHP SQL parser and we didn't
have the budget to develop one. So we struck a balance between
development cost and feature set.
> Here is the complete SQL-Statement with the correct filter syntax for
> the value that would be insertet in filters.
> SELECT pr.uid, pr.title
> FROM pages pl, pages pr
> [snip]
> FROM tx_comments_special
> WHERE cruser_id = TSFE:fe_user|user|uid
> )
Indeed this is a pretty complex query and there's no way you'll be able
to achieve it with the standard Tesseract components, no matter how many
filters and providers you try to put together. Furthermore my estimate
is that developing dataquery to support your needs would be a pretty
heavy task.
However we encountered complex scenarios too before and we solved them
by developing a custom Data Provider. Consider the watch finder of the
Worldtempus web site [1]. It provides a pretty complex search, pointing
to a lot of MM tables in the background. It would have been impossible
to write a correct SQL query for dataquery and apply the proper filters
to it. Instead we wrote a custom Data Provider which is used as a
secondary provider to the main query on the watches tables.
Everything you need to develop such a provider can be found in the
"tesseract" manual. Furthermore you can look at extension
"tagpackprovider" as an example of such secondary provider.
HTH
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
[1] http://www.worldtempus.com/en/watches/find-your-watch/
More information about the TYPO3-english
mailing list