Deleting all docs should be the same as creating a new index. But I don't understand your ID syntax:
*familyId!documentId!newDocumentId.* Can you explain what that even means? There should be only one id, not an "old" and "new"? Jan > 7. mar. 2024 kl. 04:41 skrev Modassar Ather <modather1...@gmail.com>: > > Hi Gus, > > I have deleted all the existing documents and then indexed again with the > modified id. After deletion there were no documents in the index. > > Thanks, > Modassar > > On Wed, 6 Mar 2024 at 8:55 PM, Gus Heck <gus.h...@gmail.com> wrote: > >> "Completely Fresh" is a non-technical term. You could mean several things, >> some of which are "fresher" than others: >> >> - Created a new collection with zero docs, switch alias when complete >> (preferred) >> - Sent all docs to the existing collection (not preferred for full >> re-index, worst for your use case) >> - Attempted to delete all docs and then send new data to existing >> collection (least preferred) >> >> Which of these things are you doing? >> >> -Gus >> >> >> On Wed, Mar 6, 2024 at 9:10 AM Modassar Ather <modather1...@gmail.com> >> wrote: >> >>> Thanks Jan for your response. >>> >>> I am doing completely fresh indexing after the id change. >>> >>> Best regards, >>> Modassar >>> >>> On Wed, 6 Mar 2024 at 7:28 PM, Jan Høydahl <jan....@cominvent.com> >> wrote: >>> >>>> Never change the ID of a document, it must be static in order for >> routing >>>> to work. >>>> If you need to change an ID, first issue a delete command for the old >> id. >>>> >>>> Read more about routing and composite ID here >>>> >>> >> https://solr.apache.org/guide/solr/latest/deployment-guide/solrcloud-shards-indexing.html#document-routing >>>> >>>> Jan >>>> >>>>> 6. mar. 2024 kl. 05:26 skrev Modassar Ather <modather1...@gmail.com >>> : >>>>> >>>>> Hi, >>>>> >>>>> Kindly provide you valuable suggestions. >>>>> >>>>> Thanks, >>>>> Modassar >>>>> >>>>> On Tue, 5 Mar 2024 at 7:14 PM, Modassar Ather < >> modather1...@gmail.com> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> As it is required for the documents of the same group to be >> co-located >>>> on >>>>>> the same shard for grouping and faceting on SolrCloud I am using a >>>> document >>>>>> router with a unique family id and document id when indexing. i.e >>>>>> *familyId!documentId* >>>>>> >>>>>> Recently I had to add new data into the index for which I need to >>>> combine >>>>>> the main document with these new documents associated. >>>>>> As the main documents are inflated with every occurrence of the new >>>>>> document set it creates duplicates so to accommodate it I am adding >>> the >>>> new >>>>>> document's id to the routing field. i.e >>>>>> *familyId!documentId!newDocumentId.* >>>>>> With the new id I notice that few documents belonging to the same >>> family >>>>>> are going to different shards. >>>>>> >>>>>> Please help me understand if I am doing something wrong and share >> your >>>>>> suggestions to fix it. >>>>>> >>>>>> Thanks, >>>>>> Modassar >>>>>> >>>> >>>> >>> >> >> >> -- >> http://www.needhamsoftware.com (work) >> https://a.co/d/b2sZLD9 (my fantasy fiction book) >>