[
https://issues.apache.org/jira/browse/SOLR-17225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126352#comment-18126352
]
Alessandro Benedetti commented on SOLR-17225:
---------------------------------------------
*A* *possible* *fix:* make parse() return a wrapper ValueSource whose
FunctionValues sleeps in
floatVal/doubleVal/exists etc. before delegating to the wrapped value source.
That would make the sleep
happen per document. One thing to watch: \{!func}sleep(...) is probably used
elsewhere in the tests, for
example in timeAllowed or partial-results tests. Those tests may rely on the
sleep happening once at
parse time, so changing it could change their timing. You could keep the
current behaviour as is and add
a separate per-document variant, or check those callers before changing it.
> Sleep function query to sleep on execution rather than parsing
> --------------------------------------------------------------
>
> Key: SOLR-17225
> URL: https://issues.apache.org/jira/browse/SOLR-17225
> Project: Solr
> Issue Type: Improvement
> Components: function query, Tests
> Affects Versions: 9.5
> Reporter: Alessandro Benedetti
> Priority: Major
> Labels: test
>
> Currently, there is a sleep(x,y) function query available in Apache Solr.
> This function query sleeps for <x> ms and then return <y> as a value.
> Currently the sleep happens on query parsing, rather than execution.
> This can cause a problem in tests when used for example in Learning To Rank
> where a function query can be used as a SolrFeature.
> In Learning To Rank the feature extraction is separated from the feature
> parsing (the weight generation).
> The extraction happens per document while the parsing happens once.
> So when using a sleep feature you expect the sleep to happens whenever you
> extract the value of the feature rather than at parsing time.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]