<![CDATA[ How to speed up AjaxSearch with a site that contains 2,000+ pages? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=71638 <![CDATA[How to speed up AjaxSearch with a site that contains 2,000+ pages?]]> https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-399390
We are currently trying to implement AjaxSearch on a MODx Evolution site which has over 2,300 documents, we would like the search to work across the content and TV, each page has around 7 TV's.

When we search at the moment it is really slow, I suspect because it is doing a lot of db queries at the same time, when we limit the search to content only it runs quick.

Any tips on how to speed up the AjaxSearch? I'm currently thinking that I might have to run a cron job each day which GROUP_CONCACT the TV's for each page and adds them to the MODx document description, comma separated but I was wondering if there is an out of the box way to speed boost this?

Thanks Aaron]]>
onesmarthost Nov 09, 2011, 02:08 AM https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-399390
<![CDATA[Re: How to speed up AjaxSearch with a site that contains 2,000+ pages?]]> https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-497897
I have also encountered the problem where ajax search does not simply work. I have somewhere around 1500 documents and using ajax search encounters the 500 Internal Server Error. I tried using the parameter &whereSearch=`content` but still no success.

I am using Modx Evo 1.0.13 and using somewhere 20 TVs.

Can you please help me?]]>
santoshmaharjan May 13, 2014, 02:39 PM https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-497897
<![CDATA[Re: How to speed up AjaxSearch with a site that contains 2,000+ pages?]]> https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-399877
The performances depend mainly of how is set up the request. As soon as you have a huge volume of documents, it is preferable to disallow the group concat by setting whereSearch=`content` and preferrably use the withTvs and tvPhx parameters.


Since I have developed AdvSearch for Revolution I know how I could improve the speed of some complex requests. I did some tests with a database of 430 documents. With 74 search results and 4 tvs. I have divided by about 4 the execution time of the sql request (compared to the group_concat) and by 2 (by using withTvs & tvPhx).

But this is really tricky to explain on a post. And to be effective this will imply to rewrite a part of ajaxSearchResult class. And I have no idea what could be the real impact on huge volume of documents (2000+).

This is why I am interested to do some sql tests with you on your database. I sent you a personal message about this post.

]]>
coroico Nov 14, 2011, 05:09 AM https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-399877
<![CDATA[Re: How to speed up AjaxSearch with a site that contains 2,000+ pages?]]> https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-399412
What kind of data is held in the TVs? You might be better off putting it into a custom table - or the cron job as suggested might work as well.]]>
okyanet Nov 09, 2011, 06:01 AM https://forums.modx.com/thread/71638/how-to-speed-up-ajaxsearch-with-a-site-that-contains-2-000-pages#dis-post-399412