none
Is docid unique per collection or per FAST index? RRS feed

  • Question

  • Can two separate content collections have the same docid or will the second one overwrite the other? We use the Content API and index documents into different collections.
    Friday, June 24, 2011 3:26 PM

Answers

  • Hello Erkan,

    You can safely index with the same docid into two collections, as the internalid will append the collection name.

    Example with two collections: test and test2

    95f20a604bcb8162cc22e669653a363b_test

    95f20a604bcb8162cc22e669653a363b_test2

    Regards,
    Mikael Svenson 


    Search Enthusiast - MCTS SharePoint/WCF4/ASP.Net4
    http://techmikael.blogspot.com/
    • Marked as answer by Erkan C Friday, June 24, 2011 8:44 PM
    Friday, June 24, 2011 8:10 PM
  • Hi Erkan,

    When instantiation the Feeder object you pass in the collection name:

    Factory.CreateDocumentFeeder(contentDistributors, collection, connectorName, certificateThumbprint)
    


    so when calling RemoveDocument on the feeder object you will delete it from the correct collection.

    Regards,
    Mikael Svenson 


    Search Enthusiast - MCTS SharePoint/WCF4/ASP.Net4
    http://techmikael.blogspot.com/
    • Marked as answer by Erkan C Friday, June 24, 2011 8:44 PM
    Friday, June 24, 2011 8:40 PM

All replies

  • Hello Erkan,

    You can safely index with the same docid into two collections, as the internalid will append the collection name.

    Example with two collections: test and test2

    95f20a604bcb8162cc22e669653a363b_test

    95f20a604bcb8162cc22e669653a363b_test2

    Regards,
    Mikael Svenson 


    Search Enthusiast - MCTS SharePoint/WCF4/ASP.Net4
    http://techmikael.blogspot.com/
    • Marked as answer by Erkan C Friday, June 24, 2011 8:44 PM
    Friday, June 24, 2011 8:10 PM
  • Thanks Mikael. I saw that internaldocid has the collection name appended. But what happens when you call RamoveDocument using the Content API? You just pass the docid, not the internaldocid. Or, do I need to somehow obtain the internaldocid and pass that into RemoveDocument? Otherwise, how do you know which document you're actually deleting?

     

    Thanks,

    Erkan

    Friday, June 24, 2011 8:19 PM
  • Hi Erkan,

    When instantiation the Feeder object you pass in the collection name:

    Factory.CreateDocumentFeeder(contentDistributors, collection, connectorName, certificateThumbprint)
    


    so when calling RemoveDocument on the feeder object you will delete it from the correct collection.

    Regards,
    Mikael Svenson 


    Search Enthusiast - MCTS SharePoint/WCF4/ASP.Net4
    http://techmikael.blogspot.com/
    • Marked as answer by Erkan C Friday, June 24, 2011 8:44 PM
    Friday, June 24, 2011 8:40 PM
  • You're right. We do do that.

    Thanks a lot!

    -Erkan

    Friday, June 24, 2011 8:43 PM