Giter Club home page Giter Club logo

watson-discovery-ui's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watson-discovery-ui's Issues

Application crashing on Deployment using IBM cloud foundry

Hi team
having some issue with deployment during my attempts to use the discover UI

I use the cloud foundry install link, configure my pipeline
Running the pipeline allows the build (cloning the repository) However when attempting to deploy the service there is a crash in the service.

I am not running a free plan as such but I appear to have come across this issue being reported previously (back in 2019)
So perhaps there was an update issue between Cloud and now

The log is included below

thanks
Sam
watson-discovery-ui-20210420053542370-log.txt
image
image

Error trying to run locally. Error: Missing required parameters: apikey

sjm@Stuarts-MBP-2 watson-discovery-ui-master 2 % npm start

[email protected] start /Users/sjm/Downloads/watson-discovery-ui-master 2
node --max_old_space_size=512 app.js

/Users/sjm/Downloads/watson-discovery-ui-master 2/node_modules/ibm-cloud-sdk-core/auth/utils/helpers.js:67
throw missingParamsError;
^

Error: Missing required parameters: apikey
at Object.getMissingParams (/Users/sjm/Downloads/watson-discovery-ui-master 2/node_modules/ibm-cloud-sdk-core/lib/helper.js:102:11)

Again I tried the uRL in different formats and I always find error

I get this error when trying to rum npm start
Invalid URI "%3Chttps://discovery-us-south.watsonplatform.net/regions/us-south/services/436a1ef6158b405fb8fb64b28278eec1%3E/v1/environments". Also I cannot find log files at the path provided

/Users/elnagarsa/.npm/_logs/2019-02-14T22_43_21_312Z-debug.log
SOB-elnagarsa:watson-discovery-ui elnagarsa$

Prolem with local running

Good morning

I tried to run the application using my own collection with my own set of documents, however, when launching the command npm start It seems every thing is going good but I got this error message

Unhandled rejection TypeError: Cannot read property 'length' of undefined
at C:\Users\user\Desktop\Projet FFA\watson-discovery-ui\lib\utils.js:133:41

Error: Couldn't find preset "es2015" relative to directory

I'm getting this error when trying to run npm start. I've updated npm and node to the latest versions. Any idea of what could be causing this?

/Users/jward/Desktop/watson-discovery-ui/node_modules/express-browserify/index.js:104
				throw err;
				^

Error: Couldn't find preset "es2015" relative to directory "/Users/jward/Desktop/watson-discovery-ui" while parsing file: /Users/jward/Desktop/watson-discovery-ui/public/js/bundle.js
    at /Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (/Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/jward/Desktop/watson-discovery-ui/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at Babelify._flush (/Users/jward/Desktop/watson-discovery-ui/node_modules/babelify/index.js:26:24)
    at Babelify.prefinish (_stream_transform.js:136:10)
    at Babelify.emit (events.js:127:13)
    at prefinish (_stream_writable.js:621:14)
    at finishMaybe (_stream_writable.js:629:5)
    at endWritable (_stream_writable.js:640:3)
    at Babelify.Writable.end (_stream_writable.js:582:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jward/.npm/_logs/2018-03-05T19_33_11_802Z-debug.log

"Error fetching results"

Hello,

I am working on getting the Watson Discovery UI setup to use my data set, however, a majority of the time when submitting a query I get the error within the UI which states "Error fetching results". When I submit the same query through the Discovery Tooling or using cURL commands I get proper answers.

From the Developer Tools window the code seems to exit with the Error "TypeError: fragment.childNodes[1].childNodes is undefined" at line 516 in the main.js file. However, if I limit the results returned to 10 at line 451 in main.js I do not get this error and answers are returned, though they are not the best answers which I would expect.

Is this an issue that has been encountered, and are there any ways to properly fix the error I am experiencing.

Thanks,

-R

Highlight not working

First time trying the code after the Discovery V2 update, but it seems highlight words is not working like in V1 Version...

SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'

dear,I'm getting this error when trying to run npm start. I've updated npm and node to the latest versions. Any idea of what could be causing this?

C:\tools\nodejs\node-global\node_modules\watson-discovery-ui\node_modules\express-browserify\index.js:104
throw err;
^
SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\tools\nodejs\node-cache_logs\2018-04-19T02_31_33_087Z-debug.log

thanks.

An unexpected error occurred while processing your document.

we are getting following error while uploading document on Watson tried by API endpoints.

Response

{
  "document_id" : "cdb7c1ec-3c5e-462e-b721-ec098d9df2a0",
  "filename" : "filename.pdf",
  "file_type" : "pdf",
  "sha1" : "8f9fa3dd0382172131d5e47b860f30c68152bee4",
  "status" : "failed",
  "status_description" : "Document failed to be ingested and indexed",
  "notices" : [ {
    "notice_id" : "internal_error",
    "document_id" : "cdb7c1ec-3c5e-462e-b721-ec098d9df2a0",
    "created" : "2019-03-06T09:08:49.064Z",
    "severity" : "error",
    "step" : "pdf",
    "description" : "An unexpected error occurred while processing your document."
  } ]
}

Environment Details
Storage: 6.97 MB / 200 MB
Documents: 5 / 1,000
Collections: 1 / 2

entity 'mentions' feature is not available via Discovery tooling

This feature is only available using the Disco API, so users loading their own data sets and config using the Discovery UI tooling won't have access to this.

To get this feature, they can need to let the app build the data for them.

This 'feature' adds a couple of nice enhancements to the app UI:

  1. if the user selects an 'entity' filter, the 'entity' will be highlighted in the AirBnb review text.
  2. if the user selects an 'entity.type' filter, any corresponding matches will be highlighted in the AirBnb review text. For example, if they select the 'entity.type' filter of "Sport", "golf" and "baseball" will be highlighted.

Need to get memory size down to 256M

Trial versions of IBM Cloud require that we limit app size to 256MB in manifest.yaml when user chooses the 'Delpoy to IBM Cloud' option. Currently, 1024M is required for app to run without getting 'out of memory' error. Need to investigate issue...

API Endpoint

I am using Frankfurt API, so my application is not connecting with the Discovery service using my credentials. It is pointing to a different endpoint. Where can I change it?
Thanks

How do I use an instance of discovery I already have?

I've added the .env file with my own environment id, api and collection id, but deployment still fails every time. What else do I need to change? Thank you for any help

FAILED
Server error, status code: 502, error code: 10001, message: Service broker error: You can only have one instance of a Lite plan per service. To create a new instance, either delete your existing Lite plan instance or select a paid plan.

Finished: FAILED

When using Entity and Relation Extraction only, the watson-discovery-ui does not display any results

Hello,

we are trying to query Discovery using entity and relation extraction only. When using the AirBnB example and adding enrichments "Entity" and "Realation" only for the 999 sample docs included in watson-discovery-ui/data, then the Discovery UI correctly displays the number of entities / realtions found. For the example that is

Person(625)
Facility(388)
GeopoliticalEntity(333)
EventCommunication(213)
Location(183)

image

However, when using the watson-discovery-ui to do a search, no results are displayed at all (without selecting any filter, the query result is empty). Also, when e.g. filtering by EntityType "Person", no results are displayed. Please note in the screenshot below, that the network tab displays the result JSON of the query. The full JSON is attached further below.

image

So, in the Chrome Dev-Tools - if we use no filtering at all or use a simple filter for EntityType "Person" - we can see that Discovery responses with a JSON that includes e.g. Person entites and the text where the person is mentioned. Why are the results returned for Entity/Realtion extraction not displayed by the watson-discovery-ui? I.e. what do we need to do, in order to see Matches for both, an "empty" query and/or a query that filters by EntityType?

Please see the full response JSON for an empty/unfiltered search attached:

test_query_response_json.json.txt

Thank you.

deploy to IBM Cloud fails with 'Could not bind to service wdui-discovery-service'

Issue found by an external customer and reproduced in DAL

steps to reproduce:

expected: deploy completes OK
observed: deploy failed with:

Done uploading
OK
Binding service wdui-discovery-service to app watson-discovery-ui-20190610115059701 in org [email protected] / space dev as [email protected]...
FAILED
Could not bind to service wdui-discovery-service
Error: Server error, status code: 409, error code: 60016, message: An operation for service instance wdui-discovery-service is in progress.

Finished: FAILED

Insufficient credentials

Just put my credential into the file env.sample and rename it on .env

but just got the following issue

Error: Insufficient credentials provided in constructor argument. Refer to the documentation for the required parameters. Common examples are username/password, api_key, and iam_access_token.

this is my .env file

DISCOVERY_URL=https://gateway-XXX.watsonplatform.net/discovery/api
DISCOVERY_ENVIRONMENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DISCOVERY_COLLECTION_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DISCOVERY_APIKEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

can't deploy

ther's error on deployng on ibm bluemix
i tryed with my own .env file and credentials but still not working

Issue with Deployment

Hi Everyone!

I tried deploying this to my IBM cloud account but for some reason, the Delivery Pipeline stage fails. I tried checking the logs in the Discovery Application to see if there were any errors that were occurring but there were no error messages. I even cleared all services and instances off of my Cloud Account and redeployed it and it still failed.

Any guidance on this would be great!

Thanks!!

Issues when deploying to IBM Cloud app crashes

I clicked the deploy to IBM cloud button, started the tool chain but it keeps crashing. I've deleted the app and all service instances and restarted several times to try and see if anythings changes but no luck so far. I've tried increasing the memory per instance to 512 mb too, and then redeployed, but that hasn't helped either.
Here is the error:
Exit status 0
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploading build artifacts cache...
Uploaded build artifacts cache (13.8M)
Uploaded droplet (57.6M)
Uploading complete
Cell 9a016ce4-0142-4cab-91f5-1b4553779e3e stopping instance db7418b5-7b60-404c-9682-780f47c8e8b3
Cell 9a016ce4-0142-4cab-91f5-1b4553779e3e destroying container for instance db7418b5-7b60-404c-9682-780f47c8e8b3
Cell 9a016ce4-0142-4cab-91f5-1b4553779e3e successfully destroyed container for instance db7418b5-7b60-404c-9682-780f47c8e8b3

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 crashed
FAILED
Error restarting application: Start unsuccessful

TIP: use 'cf logs watson-discovery-ui-20190124193412622 --recent' for more information

Finished: FAILED

Here's the app activity feed
app crash 1

and the logs:
logs 1
logs 2
logs 3

thanks for any help!

HI anyone can help me??

I have an application in nodejs that worked.
Then I created another application that had to be similar to the first one but when I created the other one suddenly the original one stopped working.
I deleted the new one.
the old one does not go and I have always been mistaken:an instance of the application has been stopped abnormally: APP & # x2F; PROC & # x2F; WEB: Exite.
the app use discovery.
when i click on the url i see: 503 service unavaible when i am lucky , and always i see error 404 that the url doesn't exist
PLS HELP MEEEEE

text higlighting works only for first occurrence

Hello!
I found a bug around utils.js function formatData, in the "else" section, labelled by this comment

// check if we have any 'highlights' returned by discovery

Only the first element is taken in consideration.. without take care of other highlighted parts from discovery.

I solved the bug by using another approach instead of trying to understand of to works with character positions to fill in highlight.indexes array, trying also to don't broke passages highlight... so this is why I'm not sending a pull request :D

anyway.. here's the code:

utils.js

...
} else {
      // check if we have any 'highlights' returned by discovery
      if (dataItem.highlight && dataItem.highlight.text) {
        // start by getting highlight word(s) by parsing HTML.
        // keyword will be within <em> tag.

        if (dataItem.highlight.text.length > 0) {
          newResult.highlight.fullText = dataItem.highlight.text[0].replace(/<em>/g, '<hilite>').replace(/<\/em>/g, '</hilite>');
          newResult.highlight.showHighlight = true;
          newResult.highlight.field = 'text';
          newResult.highlight.indexes = [];
        }
      }

      // check if we have any entity 'mentions' returned by discovery.
      // There can be 2 types of matches:
...

index.js getText

// format text, setting background color for all highlighted words
const getText = (item) => {
  if (item.highlight.showHighlight && item.highlight.field === 'text') {
    var str = '<style>hilite {background:#ffffb3;}</style>';
    var currIdx = 0;

    if (item.highlight.fullText) {
      str = str + item.highlight.fullText;
    } else {
      item.highlight.indexes.forEach(function (element) {
        str = str + item.text.substring(currIdx, element.startIdx) +
                '<hilite>' +
                item.text.substring(element.startIdx, element.endIdx) +
                '</hilite>';
        currIdx = element.endIdx;
      });
      str = str + item.text.substring(currIdx);
    }
    return str;
  } else {
    return item.text ? item.text : 'No Description';
  }
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.