Not so long ago, Google performed an experiment and increased the number of results on a single search page - from 10 to 30. Although the loading time for 30 results had risen to 0.9 sec from 0.4 sec, the overall search traffic fell by 20 per cent. That shows how important a search engine (and its performance) is for a website.
I don't want my blog to be solely about performance problems. However, when working on large sites you should constantly keep performance issues in mind, especially when thinking about minimizing costs related to any increases in traffic down the road.
The indexed_search indexing search engine built in TYPO3 leaves a lot to be desired and overall, I don’t recommend using it in extensive sites with large amounts of information. A better solution (albeit requiring more configuration work) would be to use the mnogosearch plug-in. This extension allows us to connect an external indexing engine of the same name, and to use its array of functions in conjunction with TYPO3. To find a detailed configuration description, visit the TYPO3 extension page. I will cover a number of additional tricks, which allow for indexing a sql
Some of you may ask why would I index a database instead of a page view. Well, that depends on what we want to achieve. For instance, a forum search feature that does not allow for displaying post authors, or a photo search feature not able to display photo authors would be quite lacking. As mnogosearch indexes the SQL database, it returns the uid of the indexed record, which may be later very easily linked to the author, similar topics etc.
To see how we can index the entire contents of mm_forum using the mnogosearch plugin and only a few changes, read on below. To start with, we need the ability to collect all required data through one sql query. The mnogosearch plugin does not provide this functionality, so we need a workaround - preferably one that does not require many changes in the code. Thankfully, we can use the define views feature (the "virtual table”) of the mysql database.
The search engine should index data from the following three tables:
- tx_mmforum_posts
- tx_mmforum_posts_text
- tx_mmforum_topics
while the next sql query will fuse everything into one view (virtual table).
sql CREATE VIEW `tx_mmforum_mnogoview` AS SELECT tx_mmforum_topics.topic_title AS topic_title,tx_mmforum_topics.uid AS uid, tx_mmforum_posts_text.post_text AS post_text FROM tx_mmforum_posts INNER JOIN tx_mmforum_posts_text ON (tx_mmforum_posts_text.post_id = tx_mmforum_posts.uid AND tx_mmforum_posts.hidden = 0 AND tx_mmforum_posts.deleted = 0 AND tx_mmforum_posts_text.hidden = 0 AND tx_mmforum_posts_text.deleted = 0 ) INNER JOIN tx_mmforum_topics ON (tx_mmforum_posts.topic_id = tx_mmforum_topics.uid AND tx_mmforum_topics.hidden=0 AND tx_mmforum_topics.deleted = 0)
Thus, we create a tx_mmforum_mnogoview view table, which can be viewed in phpmyadmin.
Now to index our table in its entirety. We don’t have to see this view in TYPO3, as it makes no references to the table in any way. The table’s contents will be read by the indexer. Mnogosearch’s indexer is invoked from cron and creates its own connection with the database.
In the next step, we will add an appropriate configuration to the tx_mongosearch_indexconfig table. At the date of writing this article, there is no other way of doing this than using phpmyadmin, but we are putting a lot of effort to change and automate this ;) The config we have to add looks like this:
value | description | |
tx_mnogosearch_type | 11 | represents records |
tx_mnogosearch_table | tx_mmforum_mnogoview | virtual table |
tx_mnogosearch_title_field | topic_title | |
tx_mnogosearch_body_field | topic_title,post_text | |
tx_mnogosearch_url_parameters | &tx_mmforum_pi1[action]=list_post&tx_mmforum_pi1[tid]={field:uid} | |
tx_mnogosearch_display_pid | 20 |
Now to reindex mnogosearch using the following command:
/path/to/php/php5 -q /path/to/web/site/typo3/cli_dispatch.phpsh mnogosearch -w -n

Latest comments
Daniel
I get a fatal error with this extension: Fatal error: Call to undefined method t3lib_div::makeInsta... / 07 May. 20:53
Zaawansowana subskrypcja, nasze nowe rozszerzenie
Michael
The correct Amazon S3 API TER link is http://typo3.org/extensions/repository/view/amazon-s3-api T... / 24 Apr. 11:44
s3example - TYPO3 i Amazon S3
Adi
Pod nową wersją t3 z gałęzi 4.5.14 (gdzie w korze znalazły się jakieś krytyczne luki) wtyczka też ni... / 02 Apr. 19:52
Zaawansowana subskrypcja, nasze nowe rozszerzenie
Rafał Brzeski
Nasze niedopatrzenie, w nowej wersji dodamy opcję wyboru tej opcji. / 21 Mar. 20:22
Zaawansowana subskrypcja, nasze nowe rozszerzenie
bocianos
Wszystko super tylko jak zrobic aby nowe adresy domyslnie miały zaznaczone otrzymywani maili w forma... / 20 Mar. 13:08
Zaawansowana subskrypcja, nasze nowe rozszerzenie