<![CDATA[ Very Slow AjaxSearch - My Forums]]> https://forums.modx.com/thread/?thread=77681 <![CDATA[Re: Very Slow AjaxSearch]]> https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-429817
I suspect that the config setup I had prior to adding the ajaxSearch (for live search) isn't working properly, but I'm not sure how to set up an advanced search with live search if I don't really want the ajax search results.

[!ajaxSearch? &ajaxSearch=`1` &jscript=`jquery` &liveSearch=`1` &config=`custom` &showInputForm=`1` &highlightResult=`1` &minChars=`2` &tplInput=`advancedSearchTpl` &advSearch=`allwords` &clearDefault=`1`!]


The custom config:
<?php
if(isset($_POST['parents'])){
	$dcfg['parents'] = $_POST['parents'];
	$modx->setPlaceholder("as.selected", $_POST['parents']);
} else {
    $dcfg['parents'] = '257';
}
?>
]]>
sottwell Jul 13, 2012, 02:34 AM https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-429817
<![CDATA[Re: Very Slow AjaxSearch]]> https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428690 bartleby Jul 03, 2012, 08:41 AM https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428690 <![CDATA[Re: Very Slow AjaxSearch]]> https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428577
[!AjaxSearch? &liveSearch=`1` &parents=`32,33,34,35` &depth=`1` &jscript=`jquery` &jsJquery=`assets/js/jquery-1.3.2.min.js` &whereSearch=`content:null` &withTvs=`yourTvName` !]


By using &whereSearch=`content:null`, you exclude the search in document fields
By adding &withTvs=`yourTvName` you search only in the tv named 'yourTvName'

And if needed, rather to use @FILE:assets/snippets/ajaxSearch/templates/ ... for each template, try to use chunks.

And obviously, remove the debug mode in production.
]]>
coroico Jul 02, 2012, 03:17 PM https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428577
<![CDATA[Re: Very Slow AjaxSearch]]> https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428576 here the Cheat Sheet.
Try &whereSearch=`` parameter. Example: &whereSearch=`content:pagetitle,longtitle,content`
]]>
microcipcip Jul 02, 2012, 03:03 PM https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428576
<![CDATA[Very Slow AjaxSearch]]> https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428561
Here is my AjaxSearch call:
[!AjaxSearch? &liveSearch=`1` &parents=`32,33,34,35`&depth=`1`&jscript=`jquery` &jsJquery=`assets/js/jquery-1.3.2.min.js` &debug=`3`!]


And my debug file:
http://pastebin.com/kW9NH2gG

It's taking an average of 45 seconds to return any results. I pared down the Array at the bottom of the debug file as it appears that it is grabbing a lot of the page content. Could this be slowing it down? How can I limit it to only specific TVs and ignoring page content? I tried using &whereSearch=`tv` but then it stopped returning any results.

Thanks for your help.]]>
bartleby Jul 02, 2012, 10:36 AM https://forums.modx.com/thread/77681/very-slow-ajaxsearch#dis-post-428561