Re:Learning to rank - Bad Request

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re:Learning to rank - Bad Request

Christine Poerschke (BLOOMBERG/ LONDON)
Hi Vincent,

Would you be comfortable sharing (redacted) details of the exact upload command you used and (redacted) extracts of the features json file that gave the upload error?

Two things I have encountered commonly myself:
* uploading features to the model endpoint or model to the feature endpoint
* forgotten double-quotes around the numbers in MultipleAdditiveTreesModel json

Regards,
Christine

----- Original Message -----
From: [hidden email]
To: [hidden email]
At: 03/06/17 13:22:40

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 | Threaded
Open this post in threaded view
|

Re: Learning to rank - Bad Request

Vincent Slot
Hi Christine,

Thanks for the reply!

I suppose something in our config doens't comply with the LTR plugin. If
I browse to http://[HOST]:[PORT]/solr/[COLLECTION]/schema/feature-store,
where I upload the features to, the browser can't find the page:

*Not Found*
No REST managed resource registered for path /schema/feature-store
...

So it seems that there /is /no feature endpoint? I suspect that maybe
our config doesn't apply necessary solr-plugins for LTR or something
similar, despite the -Dsolr.ltr.enabled=true parameter.

Any advice would be appreciated!

Thanks,

Vincent


On 06-03-17 21:18, Christine Poerschke (BLOOMBERG/ LONDON) wrote:

> Hi Vincent,
>
> Would you be comfortable sharing (redacted) details of the exact upload command you used and (redacted) extracts of the features json file that gave the upload error?
>
> Two things I have encountered commonly myself:
> * uploading features to the model endpoint or model to the feature endpoint
> * forgotten double-quotes around the numbers in MultipleAdditiveTreesModel json
>
> Regards,
> Christine
>
> ----- Original Message -----
> From: [hidden email]
> To: [hidden email]
> At: 03/06/17 13:22:40
>
> 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 | Threaded
Open this post in threaded view
|

Re: Learning to rank - Bad Request

Vincent Slot
Update: solved, I missed some config steps.

Thanks for the help,

Vincent

On 07-03-17 12:20, Vincent wrote:

> Hi Christine,
>
> Thanks for the reply!
>
> I suppose something in our config doens't comply with the LTR plugin.
> If I browse to
> http://[HOST]:[PORT]/solr/[COLLECTION]/schema/feature-store, where I
> upload the features to, the browser can't find the page:
>
> *Not Found*
> No REST managed resource registered for path /schema/feature-store
> ...
>
> So it seems that there /is /no feature endpoint? I suspect that maybe
> our config doesn't apply necessary solr-plugins for LTR or something
> similar, despite the -Dsolr.ltr.enabled=true parameter.
>
> Any advice would be appreciated!
>
> Thanks,
>
> Vincent
>
>
> On 06-03-17 21:18, Christine Poerschke (BLOOMBERG/ LONDON) wrote:
>> Hi Vincent,
>>
>> Would you be comfortable sharing (redacted) details of the exact
>> upload command you used and (redacted) extracts of the features json
>> file that gave the upload error?
>>
>> Two things I have encountered commonly myself:
>> * uploading features to the model endpoint or model to the feature
>> endpoint
>> * forgotten double-quotes around the numbers in
>> MultipleAdditiveTreesModel json
>>
>> Regards,
>> Christine
>>
>> ----- Original Message -----
>> From: [hidden email]
>> To: [hidden email]
>> At: 03/06/17 13:22:40
>>
>> 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 | Threaded
Open this post in threaded view
|

Re: Learning to rank - Bad Request

woodthom
Hi,

please could you post the relevant config steps? I am able to get the
techproducts example working  from here:
https://github.com/apache/lucene-solr/tree/master/solr/contrib/ltr/example

but if I change to another index I get the error

"No REST managed resource registered for path /schema/feature-store/"

Thanks



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Learning to rank - Bad Request

sophia250
In reply to this post by Vincent Slot
What missing steps did you fix to solve the issue? i am facing exactly the
same as you had before



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Learning to rank - Bad Request

sophia250
In reply to this post by woodthom
I posted name feature one by one and thus it works.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html