Hello Experts, My goal is to understand the time complexity of the Boosting Query as part of a search in Solr:
sort=score+desc defType=edismax boost=<function> I followed the stacktrace for the the search call and I am believe the time complexity is as follows: - Main Query time + multiple filters reduce the DocId set of lets say size N. - Boost Query iterates the N DocId set and scores using the function. Time Complexity: O(N) - Since Tim Sort is used worst case Time Complexity is O(NLogN). Can I know is this is a correct understanding? *Or, does the Custom function boost scoring happens in tandem with Document Matching ?* *Call StackTrace:* com.<my_company>.functions.functionvalues.PmmlComputation.pmml(PmmlComputation.java:75) com.<my_company>.functions.functionvalues.PmmlDoubleValues.doubleVal(PmmlDoubleValues.java:23) org.apache.lucene.queries.function.docvalues.DoubleDocValues.floatVal(DoubleDocValues.java:49) org.apache.lucene.queries.function.valuesource.ProductFloatFunction.func(ProductFloatFunction.java:39) org.apache.lucene.queries.function.valuesource.MultiFloatFunction$1.floatVal(MultiFloatFunction.java:82) org.apache.lucene.queries.function.BoostedQuery$CustomScorer.score(BoostedQuery.java:129) org.apache.lucene.search.ConjunctionScorer.score(ConjunctionScorer.java:64) org.apache.lucene.search.TopScoreDocCollector$SimpleTopScoreDocCollector$1.collect(TopScoreDocCollector.java:64) org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174) org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:221) org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:172) org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39) org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:669) org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473) org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:211) org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1861) org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1578) org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:581) org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:528) org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295) org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154) org.apache.solr.core.SolrCore.execute(SolrCore.java:2089) org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652)