We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4080
    • 139 Posts
    Does anyone know how to remove the image paths that are showing up in the excerpts? Please see attached and thank you in advance!

    P.S. The path is set in a TV and I’m guessing that has something to do with it.
      • 4080
      • 139 Posts
      Doh! I also meant to post the current state of my AjaxSearch snippet calls:

      Search Form
      [!AjaxSearch? 
      	&debug=`2` 
      	&ajaxSearch=`0` 
      	&whereSearch=`content:longtitle,content` 
      	&landingPage=`414`
      	&hideMenu=`0` 
      	&parents=`0` 
      	&depth=`2` 
      	&tplInput=`search-form-utility-tpl`
      	&showResults=`0`
      	&descriptionShow=`1`
      	&advSearch=`exactphrase`	
      !]

      Search Results
      [!AjaxSearch? 
      	&ajaxSearch=`0` 
      	&depth=`2` 
      	&advSearch=`exactphrase` 
      	&showInputForm=`0` 
      	&hideMenu=`0`
      	[comment]&breadcrumbs=`Breadcrumbs,showHomeCrumb:0,showCrumbsAtHome:0`[/comment]
      !]

        • 5811
        • 1,717 Posts
        Does anyone know how to remove the image paths that are showing up in the excerpts
        The path is set in a TV and I’m guessing that has something to do with it
        By default whereSearch=`content,tv`. and the returned tv field value is the concatenation of all the tv values of the document found.

        So use whereSearch=`content` (or content:longtitle,content). By doing this, you simplify the sql statement and doesn’t find results when the search term is in TV. But keep care the &whereSearch should be also in the AS snippet call of the landing page.
        If you need to search in one or two specific Tvs, use &withTvs=`tv1,tv2`
        if you need a tv value (but doesn’t search in) simply add &tvPhx=`tv3`

        [!AjaxSearch? 
        	&debug=`2` 
        	&ajaxSearch=`0` 
        	&whereSearch=`content:longtitle,content` 
        	&landingPage=`414`
        	&hideMenu=`0` 
        	&parents=`0` 
        	&depth=`2` 
        	&tplInput=`search-form-utility-tpl`
        	&showResults=`0`
        	&descriptionShow=`1`
        	&advSearch=`exactphrase`	
        !]


        except if you would like limit the search to the 2 first level, &parents=`0` &depth=`2` is useless. By default the search occurs in all documents. But the sql order is simpler without using the &parents parameter (you don’t set up a list of ids).
        &descriptionShow doesn’t exist as parameter
        Don’t forget to remove &debug=`2` when you will be in production wink

        So your AS call should become:
        [!AjaxSearch? 
        	&ajaxSearch=`0` 
        	&whereSearch=`content:longtitle,content` 
        	&landingPage=`414`
        	&hideMenu=`0` 
        	&depth=`2` 
        	&tplInput=`search-form-utility-tpl`
        	&showResults=`0`
        	&advSearch=`exactphrase`	
        !]


        [!AjaxSearch? 
        	&ajaxSearch=`0` 
        	&advSearch=`exactphrase` 
        	&showInputForm=`0` 
        	&hideMenu=`0`
        	[comment]&breadcrumbs=`Breadcrumbs,showHomeCrumb:0,showCrumbsAtHome:0`[/comment]
        !]
        becomes
        [!AjaxSearch? 
        	&ajaxSearch=`0` 
            &whereSearch=`content:longtitle,content` 
        	&advSearch=`exactphrase` 
        	&showInputForm=`0` 
        	&hideMenu=`0`
        !]
          • 4080
          • 139 Posts
          Thanks, coiroico! Y’all are always so dang fast.

          I have AjaxSearch successfully not pulling any TVs (though I’d like to specify several TVs to search but then some to not search—like the ones with an image path for the value). I’ve tried &withTvs but was having trouble with the syntax. Do you have time to give a quick example of saying "include these 3 TVs in the search but not these 2" (or something to that effect)?

          For some reason now I’m not getting the extract now either. Here’s what my calls look like:

          Form
          [!AjaxSearch? 
          	&ajaxSearch=`0`
          	&whereSearch=`content`
          	&landingPage=`414`
          	&hideMenu=`0` 
          	&depth=`2` 
          	&tplInput=`search-page-form-tpl`
          	&showResults=`0`
          	&advSearch=`oneword`
          	&breadcrumbs=`Breadcrumbs,showHomeCrumb:0`
          	&extract=`1`
          !]

          Results
          [!AjaxSearch? 
          	&ajaxSearch=`0`
          	&whereSearch=`content`
          	&showInputForm=`0` 
          	&hideMenu=`0`
          	&depth=`2`
          	&advSearch=`oneword`
          	&breadcrumbs=`Breadcrumbs,showHomeCrumb:0`
          	&extract=`1`
          !]
            • 4080
            • 139 Posts
            Sorry. I also meant to mention that for some reason (this wasn’t happening before), but when I try to use the following...
            &whereSearch=`content:pagetitle,longtitle,content`

            ...no results are returned now for some reason. That’s why I had to switch it to...
            &whereSearch=`content`
            Is it possible that I have conflicting parameters. I keep getting a little confused as to what needs to be in the form and then what needs to be in the results.
              • 5811
              • 1,717 Posts
              By default if you don’t use the whereSearch parameter in your snippet call you use &whereSearch=`content|tv` which means content:pagetitle,longtitle,description,alias,introtext,menutitle,content | tv:tv_value

              By using &whereSearch=`content:pagetitle,longtitle,content` , you exclude the search in tv. if the searchterm exist somewhere in an another field, you can’t find it.
              By using &whereSearch=`content` you use in fact &whereSearch=`content:content:pagetitle,longtitle,description,alias,introtext,menutitle,content

              I think you could see the differences in the debug file (do a search and read the /debug/ajaxSearch_debug.txt file. Search the SQL statement. a code like this:
              [26-Oct-10 09:58:02]  0.0985s  3.81Mb > Select :  
              SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.template, sc.menutitle, sc.content, sc.publishedon,


                • 4080
                • 139 Posts
                Thanks again! This helps clear things up. I’m not sure why I’m not getting the extracts still but I’m ok with that for now!

                :)