Hi all,

I've been trying to get learning to rank working on our own search index. Following the LTR-readme (https://github.com/bloomberg/lucene-solr/blob/master-ltr/solr/contrib/ltr/example/README.md) I ran the example python script to train and upload the model, but I already get an error during the uploading of the features:

Bad Request (400) - Expected Map to create a new ManagedResource but received a java.util.ArrayList at org.apache.solr.rest.RestManager$RestManagerManagedResource.doPut(RestManager.java:523) at org.apache.solr.rest.ManagedResource.doPost(ManagedResource.java:355) at org.apache.solr.rest.RestManager$ManagedEndpoint.post(RestManager.java:351) at org.restlet.resource.ServerResource.doHandle(ServerResource.java:454)
    ...

This makes sense: the json feature file is an array, and the RestManager needs a Map in doPut.

Using the curl command from the cwiki (https://cwiki.apache.org/confluence/display/solr/Learning+To+Rank) yields the same error, but instead of it having "received a java.util.ArrayList" it "received a java.lang.String".

I wonder how this actually is supposed to work, and what's going wrong in this case. I have tried the LTR with the default techproducts example, and that worked just fine. Does anyone have an idea of what's going wrong here?

Thanks in advance!
Vincent

Reply via email to