0 Replies Latest reply: Sep 16, 2013 6:33 AM by JesterFortyEight RSS

    CFINDEX - Update existing collection with new data - duplicates records

    JesterFortyEight Community Member

      I have a collection made up of a document crawl to index pdf, word, excel etc.

       

      now i need to update the existing collection with meta data related to articles in reference to the documents, however when i run the query to update the meta data the existing records do not get updated, a new record is created

       

      initial index

       

      <cfif isNumeric(idx)><!--- directories named by year e.g.: 2009 are public --->

              <cfset sCollectionName="#aCollectionCreated[1].CollName#">

              <cfindex collection="#sCollectionName#" 

                action="update" 

                type="path"

                key="\\192.168.168.66\media\#idx#\" 

                urlpath="#sFullSeverName#/wp-content/uploads/#idx#/"

                extensions = "#lstValidFileExtensions#"

                recurse="yes"

                  postterms_s = "" <--- used in later update --->

                  posttermssearch_s = ""<--- used in later update --->

                  posttermssearch_t = ""<--- used in later update --->

       

                >

          </cfif>

       

      which creates about 1800 records

       

      later afrer some manipulation nd cleanup (soem files need to be removed) i run

       

      <cfindex

          query="getTermsMembers"

          collection="#sCollectionName#"

          action="Update"

          type="Custom"

          key="KEY_LOOKUP"

          body="url"

          postterms_s = "terms"

          posttermssearch_s = "terms_search"

          posttermssearch_t = "terms_search"

      >

       

      i have confirmed that teh collection key and the value in KEY_LOOKUP are the same, but after running this block the number of records in teh collection doubles

       

       

      CF10, Solr

       

      1) is what i am trying to do possible?

      2) what am i doing wrong?

       

       

      Thanks