PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Customise XML Output

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customise XML Output

    Hi,

    We use the XML option (zoom_xml=1) to make requests to the search engine on almost every page of our site. After making the request, we get the Title, and the Link from the XML results, and then display them as a list on our page. Essentially creating a 'Similar Pages' widget.

    I'm trying to reduce the size of the XML file that we request, to improve page speed, and reduce download size etc. The XML file at the moment has 50 results, and includes the Title, Link, Description and Context.

    I don't need the Description or Context for my widget, so I'd like to know if I can have them NOT appear in the XML results. Removing this text will effectively reduce the size of the page we request on every page load.

    Is this possible?

    I should also mention we use 'search.cgi' as our scripting language.

  • #2
    Are you parsing the XML results server side (in for example PHP) or client side (in for example Javascript)?.

    If you did it server side, then there would be no impact on download size, and the server side parsing speed would be largely independent of the small size saving in the XML file.

    However not getting the context might speed up the search itself. You can turn off the context from the results layout tab. But I can't remember now if this impacts the XML file.

    Reducing the number of results to 10 from 50 would also reduce the size of the XML file.

    Comment


    • #3
      We parse the results in Javascript so we can use the page's <title> tag to create a search.

      Will not retrieving the context do anything to our current search.cgi page? At the moment we use display:none to hide the context on our main search page. So perhaps I could turn it off all together in the results tab.

      Originally we were retrieving 100 results, and I reduced it to 50, which definitely improved the size of the XML file generated. The issue is, we need a good set of results returned because we display related results from each part of the site. For example, the most relevant article, the most relevant review, the most relevant forum thread, etc.

      Comment


      • #4
        After unchecking the 'context' tab, it has removed the context result from both our search.cgi page and the xml version of the page.

        It has also decreased the size of the page we request which is good.

        Comment


        • #5
          Yes, unchecking the Context Description feature will not only reduce the XML output, but also reduce search time, and the size of the index files significantly (the latter of which affecting your re-indexing and re-uploading times).

          So if you don't need it, it makes good sense to remove it. Note that removing this will also disable the "exact phrase" search feature however.
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment


          • #6
            Just a note, I didn't see any reduction in the size of the index files, or the re-indexing time, at all.

            Should I look into that?

            Both before and after the change, my page_text file was ~670mb.

            Comment

            Working...
            X