Search code examples
watsonwatson-discovery

Watson Discovery Passage Length


I am finding that the passages returned by Discovery are generally very good choices... but they are too short and truncated at odd points... even mid sentence. A couple of questions:

Is there a way to control the passage length returned?

Is there a way to bring the user directly to the passage within the full document?


Solution

  • It looks like they Discovery Query API now supports controlling the passage length, although the SDK's (Java and NodeJS) haven't been updated yet to support it.

    passages.characters     The approximate number of 
                  query     characters that any one passage should have. 
                integer     The default is 400. The minimum is 50. The
                            maximum is 2000. Note: The passages.characters 
                            parameter is supported only on private
                            collections. It is not supported in the 
                            Watson Discovery News collection.