[ https://issues.apache.org/jira/browse/SOLR-17699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936506#comment-17936506 ]
ASF subversion and git services commented on SOLR-17699: -------------------------------------------------------- Commit 01e1d917d9a032d705322a805d7bf3906aeef11a in solr's branch refs/heads/branch_9x from David Smiley [ https://gitbox.apache.org/repos/asf?p=solr.git;h=01e1d917d9a ] SOLR-17699: Fix {!frange} perf regression in disjunction (#3259) Since 9.0 with "frange" function queries when in a disjunction (OR). TwoPhaseIterator must be used; was iterating all docs instead. (cherry picked from commit ac74ced99e288f74a18655ec4cd2f205b976ca54) > High Query Time in Solr When Using OR with frange in fq > ------------------------------------------------------- > > Key: SOLR-17699 > URL: https://issues.apache.org/jira/browse/SOLR-17699 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: 9.0, 9.6.1 > Reporter: Puneet Sharma > Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > h3. High Query Time in Solr When Using {{OR}} with {{frange}} in {{fq}} > I am experiencing high query times in Solr when using an {{fq}} filter that > combines an {{OR}} condition with {{{}frange{}}}. The response time > significantly increases compared to queries that do not use this combination. > h4. Query Example > > {{fq=\{!cache=false tag=prm}field:value OR \{!frange l=1 u=1 v=$funcQuery}}} > Here, {{$funcQuery}} is a function query that retrieves documents dynamically > based on dynamic parameters. > h4. Observations > * When I use just {{{}{!frange l=1 u=1 v=$funcQuery}{}}}, the query executes > quickly[20ms]. > * When I use {{{!cache=false tag=prm}field:value}} alone, the query is also > fast. > * However, when combining both with {{{}OR{}}}, the query time increases > significantly [700ms]. > * The dataset is relatively large, but other queries with similar complexity > run efficiently. > h4. Questions > # Why does the {{OR}} operation with {{frange}} cause a significant increase > in query time? > # Are there any optimizations or alternative query structures that could > improve performance? > # Would it help to restructure how function queries and filters are applied > in this case? > # Is there any alternative for frange for this use case because in our use > case, this cannot be done at index time because the function parameters > change very frequently? > Any insights or suggestions would be greatly appreciated! -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org