0 Replies Latest reply on Feb 3, 2008 11:49 AM by RobandOllie

    Filtering CFindex

      We're trying to build a search page for a site in which there are duplicate files. For reference they are standard screen and full screen versions of the same thing.

      When the site was started, a CMS was not necessary so the pages were built as CFM pages with filenames of (for instance) TM1-SS-PG-001.cfm and TM1-FS-PG-001.cfm for the standard and full screen versions. Other than the payout and some of the parts in the FS version missing the content is the same. So we want to be able to index each of these pages within different folders so we do not index the FS versions.

      I tried doing it so that we did a direcotry list filtered with *SS*.cfm and looping through that list Updating the index. But the key goes wrong.

      <cfdirectory action="list" directory="d:/inetpub/wwwroot/site/s/modules/t/m1" name="filelist" filter="*SS*.cfm">

      <cfoutput query="filelist">
      <cfindex action="update" collection="st-m1" type="file" key="#filelist.directory#\#filelist.name#">

      When I index everything, IE not using this looping, the key is correct and is the filename, however, now it is like this

      RA-SS-MOD1-PG-1.cfm/TRA-SS-MOD1-PG-10.cfm/TRA-SS-MOD1-PG-11.cfm/TRA-SS-MOD1-PG-12.cfm/TRA- SS-MOD1-PG-13.cfm/TRA-SS-MOD1-PG-14.cfm/TRA-SS-MOD1-PG-15.cfm/TRA-SS-MOD1-PG-16.cfm/TRA-SS -MOD1-PG-17.cfm/TRA-SS-MOD1-PG-18.cfm/TRA-SS-MOD1-PG-19.cfm/TRA-SS-MOD1-PG-2.cfm/TRA-SS-MO D1-PG-20.cfm/TRA-SS-MOD1-PG-21.cfm/TRA-SS-MOD1-PG-22.cfm/TRA-SS-MOD1-PG-23.cfm/TRA-SS-MOD1 -PG-24.cfm/TRA-SS-MOD1-PG-25.cfm/TRA-SS-MOD1-PG-26.cfm/TRA-SS-MOD1-PG-27.cfm/TRA-SS-MOD1-P G-28.cfm/TRA-SS-MOD1-PG-29.cfm/TRA-SS-MOD1-PG-3.cfm/TRA-SS-MOD1-PG-30.cfm/TRA-SS-MOD1-PG-3 1.cfm/TRA-SS-MOD1-PG-32.cfm/TRA-SS-MOD1-PG-33.cfm/TRA-SS-MOD1-PG-34.cfm/TRA-SS-MOD1-PG-35. cfm/TRA-SS-MOD1-PG-36.cfm/TRA-SS-MOD1-PG-37.cfm/TRA-SS-MOD1-PG-38.cfm/TRA-SS-MOD1-PG-39.cf m/TRA-SS-MOD1-PG-4.cfm

      Any ideas how I can filter which files get indexed?

      PS we cannot move the files to separate folders - there are too many.