ilariapet commented on code in PR #1487:
URL: https://github.com/apache/solr/pull/1487#discussion_r1169863438


##########
solr/modules/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java:
##########
@@ -241,10 +242,31 @@ public void setContext(ResultContext context) {
      *
      * @param transformerFeatureStore the explicit transformer feature store
      */
-    private LoggingModel createLoggingModel(String transformerFeatureStore) {
-      final ManagedFeatureStore fr = 
ManagedFeatureStore.getManagedFeatureStore(req.getCore());
+    private LoggingModel createLoggingModel(
+        String transformerFeatureStore, Boolean docsWereNotReranked) {
+      final ManagedFeatureStore featureStore =
+          ManagedFeatureStore.getManagedFeatureStore(req.getCore());
+
+      // check for non-existent feature store name
+      if (transformerFeatureStore != null) {
+        if (!featureStore.getStores().containsKey(transformerFeatureStore)) {

Review Comment:
   If I have understood correctly your doubt... 
   I added two checks because _doGet_ method is used when you want to get a 
feature store, for example:
   `GET 
http://localhost:8983/solr/books/schema/feature-store/nonExistentFeatureStore`
   
   While _createLoggingModel()_ method is used when you want to extract 
features, for example:
   `GET http://localhost:8983/solr/books/query?q=test&fl=id,[features 
store=nonExistentFeatureStore]
   `
   
   Here I also handled the cases when the store name is not passed (i.e., is 
null [features]) and when the rerank query is present.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to