RE: Increase search performance

2018-02-02 Thread Atul Bisaria
Thanks for the feedback! -Original Message- From: Adrien Grand [mailto:jpou...@gmail.com] Sent: Friday, February 02, 2018 1:42 PM To: java-user@lucene.apache.org Subject: Re: Increase search performance If needsScores returns false on the collector, then scores won't be computed. Your

Re: Increase search performance

2018-02-02 Thread Adrien Grand
; > this.docBase = context.docBase; > } > > public ScoreDoc[] getHits() > { > return matches; > } > } > > Best Regards, > Atul Bisaria > > -Original Message- > From: Adrien Grand [mailt

RE: Increase search performance

2018-02-01 Thread Atul Bisaria
iginal Message- From: Adrien Grand [mailto:jpou...@gmail.com] Sent: Thursday, February 01, 2018 6:11 PM To: java-user@lucene.apache.org Subject: Re: Increase search performance Yes, this collector won't perform well if you have many matches since memory usage is linear with the number of m

Re: Increase search performance

2018-02-01 Thread Adrien Grand
Collections.shuffle(matches); > maxHitsRequired = Math.min(matches.size(), > maxHitsRequired); > > return matches.subList(0, maxHitsRequired); > } > } > > Best Regards, > Atul Bisaria > > -Original Message- >

RE: Increase search performance

2018-02-01 Thread Atul Bisaria
); } } Best Regards, Atul Bisaria -Original Message- From: Adrien Grand [mailto:jpou...@gmail.com] Sent: Wednesday, January 31, 2018 6:33 PM To: java-user@lucene.apache.org Subject: Re: Increase search performance Hi Atul, Le mar. 30 janv. 2018 à 16:24, Atul Bisaria <atul.b

Re: Increase search performance

2018-01-31 Thread Adrien Grand
Hi Atul, Le mar. 30 janv. 2018 à 16:24, Atul Bisaria a écrit : > 1. Using ConstantScoreQuery so that scoring overhead is removed since > scoring is not required in my search use case. I also use a custom Sort > object which does not sort by score (see code