aws-solutions/content-analysis-on-aws

Confidence value has no impact on search queries

aspi92 opened this issue · 1 comments

Describe the bug
For the "Analyze" functionality, the search query in the tabs does not adjust when changing the confidence value. Additionally, the API calls in the modal shown ("Show API request to get these results").

To Reproduce

  • Deploy the solution
  • Upload an image
  • Click "Analyze" in the "Collections" view after the processing of the image has finished
  • Change the "Confidence" value through the slider and observe that the result set isn't changing. Observe through Developer Tools that the query sent always contain a "Confidence" value of 90.
  • Click "Show API request to get these results" and observe that the Confidence value remains 90 despite the slider value
  • Scroll down in the modal to the "awscurl" command and observe that the URL starts with "undefined"

Expected behavior

  • Expect the results to change when the confidence value is adjusted.
  • Expect to see an executable awscurl command in the modal but not "undefined"

Please complete the following information about the solution:

  • [v2.0.0] Version (CFN deployed at 2021-11-18)
  • [us-east-1 ] Region
  • [no modifications ]
  • [ irrelevant for the bug ]
  • [ no, but in the browser console ]

Screenshots
aws_content_analysis_issue

Additional context
There are two reasons for the bugs:

  • the Vue components in question are referring to "ELASTICSEARCH_ENDPOINT" but the mixin ingesting the config variables write the endpoint to "SEARCH_ENDPOINT"
  • the Vue components correctly calls the updateConfidence method but this method doesn't update this.searchQuery to which the fetchAssetData relates. The fetchAssetData also defines an unused variable called query instead.

PR on the way.

merged