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 <[email protected]> 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 <[email protected]> > 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 <[email protected]> > 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 <[email protected] > >: > > > > > > > > Hi, > > > > > > > > Kindly provide you valuable suggestions. > > > > > > > > Thanks, > > > > Modassar > > > > > > > > On Tue, 5 Mar 2024 at 7:14 PM, Modassar Ather < > [email protected]> > > > > 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) >
