Re: Custom SliceExecutor and slices computation in IndexSearcher

2023-06-06 Thread Luca Cavanna
Thanks Sorabh, I will have a look in the coming days. On Tue, Jun 6, 2023 at 12:04 AM SorabhApache wrote: > Hi Luca, > I looked into moving the slice computation to SliceExecutor and using that > in the default case as well. This way the package private constructor with > SliceExecutor can be

Re: Custom SliceExecutor and slices computation in IndexSearcher

2023-06-05 Thread SorabhApache
Hi Luca, I looked into moving the slice computation to SliceExecutor and using that in the default case as well. This way the package private constructor with SliceExecutor can be exposed and utilized by different extensions to customize the slice computation and execution as well. I have created

Re: Custom SliceExecutor and slices computation in IndexSearcher

2023-05-27 Thread SorabhApache
Hi Luca, Thanks for the suggestion. Let me explore more on it and I will get back. But I agree making the slices non-final will require consumers to ensure slices are not mutated after the construction time and is not preferred. Thanks, Sorabh On Tue, May 23, 2023 at 3:14 AM Luca Cavanna

Re: Custom SliceExecutor and slices computation in IndexSearcher

2023-05-23 Thread Luca Cavanna
Hi Sorabh, thanks for explaining. I see what you mean, it does get awkward to customize how slices are created. If the plan is to make SliceExecutor public and extensible, would it make sense to figure out what its public methods should be, and include the slice creation in there so it is detached

Re: Custom SliceExecutor and slices computation in IndexSearcher

2023-05-19 Thread SorabhApache
Hi Luca, Thanks for your reply. Sharing an example below for clarity. *public class CustomIndexSearcher extends IndexSearcher { public CustomIndexSearcher(IndexReader reader, Executor executor, int maxSliceCount) {super(reader, executor); } @Override

Re: Custom SliceExecutor and slices computation in IndexSearcher

2023-05-19 Thread Luca Cavanna
Hi Sorabh, You'll want to override the protected slices method to include your custom logic for creating the leaf slices. Your IndexSearcher extension can also retrieve the slices through the getSlices public method. I don't understand what makes the additional constructor necessary, could you

Custom SliceExecutor and slices computation in IndexSearcher

2023-05-18 Thread SorabhApache
Hi All, For concurrent segment search, lucene uses the *slices* method to compute the number of work units which can be processed concurrently. a) It calculates *slices* in the constructor of *IndexSearcher*