Closed hansen-young closed 3 years ago
Hello,
The format of your request looks correct. Have you double-checked to confirm everything is being escaped correctly in the definition? If everything looks good can you create a gist of the full request? I haven't seen that particular error before so I'm not certain what the underlying issue is here.
I have checked the definition
and there is no problem with the escaped characters.
I have also tried the following:
\n
and \t
which returns the same response.
I have also tried removing the model metadata (the ##
before the actual model definition) and got a different error:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Error while parsing model [model_name] with type [model/ranklib]"
}
],
"type": "illegal_argument_exception",
"reason": "Error while parsing model [model_name] with type [model/ranklib]",
"caused_by": {
"type": "rank_lib_error",
"reason": "java.lang.NullPointerException: Cannot invoke \"ciir.umass.edu.learning.RANKER_TYPE.ordinal()\" because \"type\" is null",
"caused_by": {
"type": "null_pointer_exception",
"reason": "Cannot invoke \"ciir.umass.edu.learning.RANKER_TYPE.ordinal()\" because \"type\" is null"
}
}
},
"status": 400
}
Here is one of the payload I used (26 features): payload.txt
Thank you for the additional information. I was able to send the payload off without error, perhaps there is a problem with how you are creating the request?
As a sidenote, the last error you ran into comes from the type being required in the model definition. Since you ran into that it does seem like it's at least picking up on the definition text so I'm still unsure where the underlying issue is here.
Hi, I tried a fresh installation of elasticsearch on a different machine and it somehow works. So I guess the problem is on my elasticsearch not with the LTR plugin. Thankyou for you help @worleydl .
Hi, I would like to ask for help in creating model using ranklib. In the documentation and demo, it uses string for
model.model.definition
. I tried the same thing and get the following error:Here is my payload:
Detail of ES: