Closed hghaffar closed 6 years ago
This is interesting. What is your interpretation of passage.characters ? The way it is coded in the node is that it is expecting passages to be either a boolean or an object.
msg.discoveryparams.passages = {
msg.discoveryparams.passages.characters : 2000
};
As discoveryparams also needs to be an object then
msg.discoveryparams = {
passages : {
characters : 2000
}
};
But on closer reading of the API documentation I am getting the feeling that it might be
msg.discoveryparams['passages.characters']
in which case there is a coding bug in the node.
Hi,
The passage.characters is the number of characters that is return in a passage.
I have already used it in a Node.js code and I have coded like that :
const queryParams = { natural_language_query: payload.input.text, 'count': 2, 'passages': true, 'passages.characters': 600, 'passages.count': 2, 'return': 'text' };
thank you
Kind regards
Hossein Ghaffarzadeh
Architecte IBM Watson & Cloud Platform
Phone: 33-1 58 75 21 16 | Mobile: 33-6 89 98 68 82 E-mail: hghaffarzadeh@fr.ibm.com
Find me on:
----- Original message -----From: Soheel Chughtai notifications@github.comTo: watson-developer-cloud/node-red-node-watson node-red-node-watson@noreply.github.comCc: hghaffar hghaffarzadeh@fr.ibm.com, Author author@noreply.github.comSubject: Re: [watson-developer-cloud/node-red-node-watson] Discovery parameters like passages.characters doesn't work (#397)Date: Thu, Apr 19, 2018 1:14 PM
This is interesting. What is your interpretation of passage.characters ? The way it is coded in the node is that it is expecting passages to be either a boolean or an object.
msg.discoveryparams.passages = { msg.discoveryparams.passages.characters : 2000};
As discoveryparams also needs to be an object then
msg.discoveryparams = { passages : { characters : 2000 }};
But on closer reading of the API documentation I am getting the feeling that it might be
msg.discoveryparams['passages.characters']
in which case there is a coding bug in the node.
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
OK, in that case there is a coding bug in the node. I am hoping to get round to taking off the low hanging fruit of requests this weekend. I will see if I can include this is this round.
Fixed in 0.6.8
0.6.8 released
Hi,
I am trying to use the Discovery node to search in document. But it seems that the msg.discoveryparams.passages.characters= 2000 have no effect. It only returns 200 characters.
Is it possible to enhance it ? Thank you