We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24495
    • 407 Posts
    I use the sitemap snippet (http://modxcms.com/sitemap-711.html) generating a Google sitemap. Now I’m working on integrating a search engine (Sphider: www.sphider.eu) into a web site. For better indexing performance it can use an available sitemap.xml instead of crawling the site finding all links. This spidering works ok.

    But some pages contain download links to PDF files saved in /assets/files/a_dir_name/file_name.pdf

    And I would index these PDFs. Is there a way to enhance the sitemap with links to these files? I can EXCLUDE documents by template and/or TV but is there a way to INCLUDE docs?
      • 25663 MODX Staff
      • 12,272 Posts
      Sphider (about/features page) sounds interesting. What have you found to be the issues since you say it only works "ok"? It seems that it does index pdf files so why is that not working for you?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 24495
        • 407 Posts
        Sorry: finding and indexing pdf, that’s quite another cup of tea smiley

        At first I’d like to have the best way to help indexer finding all relevant documents/files (all html and pdf). There are 2 (separate!) ways finding docs with Sphider: crawling the whole site OR (logically XOR) using the sitemap.xml. Using sitemap increases the indexing performance because of the predefined paths to all relevant docs. Sphider follows only all path within the sitemap and doesn’t search for other paths in the site.

        Two issues now:
        - Building the sitemap I can’t input the paths to pdf files.
        - Regular crawling the site Sphider DOESN’T find all paths. There is a bug (or a feature grin) with relative paths. A path formed as
        <a href="/dir/subdir/...

        beginning with leading slash will be followed by spider. Paths without the leading slash are ignored (and I don’t know why). Therefore I’d prefer to use the sitemap.

        Second: depending on server configuration and/or configuration of Sphider it indexes pdf files using "pdftotext". Sphider-plus has an included pdftotext converter as an exe. This doesn’t work on linux servers (on linux exe-files can’t executed). The other way is using precompiled version of pdftotext contained in the xpdf bundle. But there is (maybe only for me yet) a problem with the path. It doesn’t work this time and I’m searching for a solution. Nevertheless this is not the question here.

        Return to start: is there a way to integrate paths to defined files into the sitemap?

        ... and returning to second issue: is there an easy way to run pdftotext (as a pre-compiled binary) on a shared linux host? I’m not a server specialist therefore I’m working by trial and error grin