parastooGit commented on issue #13499:
URL: https://github.com/apache/lucene/issues/13499#issuecomment-2612740260

   Hello,
   Thank you for response,
   
   I have some code that are not mine but deprected:
   
   var collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
   indexSearcher.search(query, new PositiveScoresOnlyCollector(collector));
   return collector.getTotalHits();
   
   I changed it to :
   
   var collectorManager = new TopScoreDocCollectorManager(1, (ScoreDoc)null, 
Integer.MAX_VALUE, false).newCollector();
   indexSearcher.search(query, new 
PositiveScoresOnlyCollector(collectorManager));
   return collectorManager.getTotalHits();
   
   but still search is deprecated, I do not want to change the functionality, 
wondering how to relace search ?!
   
   Regards,
   
   
   ________________________________
   From: Luca Cavanna ***@***.***>
   Sent: January 23, 2025 11:22 AM
   To: apache/lucene ***@***.***>
   Cc: Parastoo Saadat ***@***.***>; Mention ***@***.***>
   Subject: Re: [apache/lucene] Remove the @Deprecated methods from 
TopScoreDocCollector and TopFieldCollector (Issue #13499)
   
   You don't often get email from ***@***.*** Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>
   
   CAUTION: This email originated from outside of the organization. Do not 
click links or open attachments unless you recognize the sender and know the 
content is safe.
   
   
   @parastooGit<https://github.com/parastooGit> you need to create collector 
managers instead of collectors. There is not static create method any longer, 
you need to create the collector managers using their constructor.
   
   —
   Reply to this email directly, view it on 
GitHub<https://github.com/apache/lucene/issues/13499#issuecomment-2610294122>, 
or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/BIFK4LUTIS3QQQ4PETSU2LT2MEJKVAVCNFSM6AAAAABVXSEYSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJQGI4TIMJSGI>.
   You are receiving this because you were mentioned.Message ID: ***@***.***>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to