We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    If you set a document to be "Searchable" but this document has dynamic data from a snippet (Ditto or GetField for example) that is retrieving data from another document which is not set to be searchable, will that data be searchable or not?

    Here is an example (just an example to illustrate): Let’s say I have a catalog but I don’t want the product pages to be searchable, however I have an index page with info on all products which gets it’s data from the actual products page and I want that page to be searchable only. The idea is to include the index page (with dynamic data from product page) in the search results but not the actual product pages.

    I guess this is part 2 of the question, is the dynamic (snippet output) data searchable in the first place?

    By searchable I mean AjaxSearch grin
      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don't know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I just set up AjaxSearch on a site that has some news items on the home page as well as a regular News page, and searching for a term that appears only in the news summary on the home page only shows the individual news page with that term, not the home or the News page.

      Since the search goes directly to the database (site_content, and I think TVs as well) it couldn’t very well search for any snippet output or chunks as well. It can only search for existing content that is connected to a document.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 7231
        • 4,205 Posts
        That make sense. I am wondering how to handle this, I guess the way to do it would be to add a redirect snippet on the product page to redirect to the index page and then set the documents to searchable. Since the search is in the db the redirect would not have any effect in the results but when the visitor clicked on the link it would redirect to the index page (and I can add an anchor to jump straight down to each article). I think this should work. grin
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]