Uploaded image for project: 'BookBrainz'
  1. BookBrainz
  2. BB-572

Deleted entities appear in search results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      It looks like deleted entities still appear in search results, with the backup "(unnamed)" titles since it can't find a current alias.

      Entities with no `dataId` field should be filtered out of the results.

      It looks like the entity is not being removed from the search index because of the following error:
      ```
      (node:42) UnhandledPromiseRejectionWarning: ConfigurationError: Missing required parameter: id
      at _delete (/home/bookbrainz/bookbrainz-site/node_modules/@elastic/elasticsearch/api/api/delete.js:64:19)
      at Client._lazyLoad [as delete] (/home/bookbrainz/bookbrainz-site/node_modules/@elastic/elasticsearch/api/index.js:249:12)
      at deleteEntity (/home/bookbrainz/bookbrainz-site/lib/common/helpers/search.js:460:24)
      at _callee$ (/home/bookbrainz/bookbrainz-site/lib/server/helpers/handler.js:64:46)
      at tryCatch (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:274:22)
      at Generator.prototype.(anonymous function) [as next] (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at process._tickCallback (internal/process/next_tick.js:68:7)
      (node:42) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
      (node:42) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
      ```

            mr_monkey Monkey
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package