Reputation: 4749
IBM Watson Discovery service
I want to get the set of keywords in a particular document in a collection using discovery service. I tried the below url:
https://watson-api-explorer.mybluemix.net/discovery/api/v1/environments/{environment secret key}/collections/{collection secret key}/query?passages=true&count=10&highlight=true&version=2017-11-07
But, it is fetching from all documents in that collection. How can I specify a particular document to be searched?
Upvotes: 2
Views: 295
Reputation: 5330
It's important to know: The collections can have a lot of documents, so the query
will search across all your documents inside your collection that you specified if you won't put a field id inside the query.
According to the IBM Watson Discovery Expert @Anish Mathur you can query for a particular document using a field query
.
So something like
enviroment/{id envir}/collections/{id coll}/query?query=id:{document_id}
Upvotes: 2