We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30741
    • 65 Posts
    I am wondering with Ajax search, can we limit the search to only a select list of documents.
    I am looking at building an index for a client, who wants a list of items, it could be recipes or stores, etc.
    So I was thinking that one container would hold all the search items. In the case of recipes it would be each recipe would have a content item.
    Then I would want on the main page to use AjaxSearch to only look at those content items.
    Can you guys give me some direction?
    I didn’t see this dealt with in the wiki.

    Thanks
    -Tony
      • 5811
      • 1,717 Posts
      I am wondering with Ajax search, can we limit the search to only a select list of documents.
      ---- &parents [comma-separated list of integers  MODx document IDs] (optional)
              A list of parent-documents whose descendants you want searched to &depth depth when searching.
              All parent-documents by default
      
      
      ---- &depth [int] (optional)
              Number of levels deep to go.
              Any number greater than or equal to 1. 10 levels by default
      
      
      ---- &documents [comma-separated list of integers  MODx document IDs] (optional)
              A list of documents where to search
        • 30741
        • 65 Posts
        Thank you for the reply,
        but I am wondering how did I not see that in the wiki....?

        -Tony