community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

Missing Index Error

Open SujithFSD opened this issue 9 months ago • 5 comments

Workspace

confluence

🔖 Feature description

{ "error": { "name": "MissingIndexError", "message": "Missing index for confluence. This could be because the index hasn't been created yet or there was a problem during index creation." }, "request": { "method": "GET", "url": "/api/search/query?term=confluence&types%5B0%5D=confluence" }, "response": { "statusCode": 500 } }

i am getting below error when i am trying to install backstage confluence plugin.

🎤 Context

i am getting below error when i am trying to install backstage confluence plugin.

✌️ Possible Implementation

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • [x] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

SujithFSD avatar Mar 12 '25 04:03 SujithFSD

@fjudith any ideas on why this might be happening?

04kash avatar Mar 25 '25 15:03 04kash

After running a quick test I was also able to replicate this error:

{
  "error": {
    "name": "MissingIndexError",
    "message": "Missing index for confluence. This could be because the index hasn't been created yet or there was a problem during index creation.",
    "stack": "MissingIndexError: Missing index for confluence. This could be because the index hasn't been created yet or there was a problem during index creation.\n    at LunrSearchEngine.query (/home/bramos/work/community-plugins/workspaces/confluence/node_modules/@backstage/plugin-search-backend-node/src/engines/LunrSearchEngine.ts:203:13)\n    at <anonymous> (/home/bramos/work/community-plugins/workspaces/confluence/node_modules/@backstage/plugin-search-backend/src/service/router.ts:193:39)"
  },
  "request": {
    "method": "GET",
    "url": "/query?term=Errata%2FErrata%2BTool&types%5B0%5D=confluence"
  },
  "response": {
    "statusCode": 500
  }
}

Looking at the backstage docs it looks like this error is getting thrown: https://backstage.io/docs/reference/plugin-search-backend-node.missingindexerror

I still haven't fully determined what causes this.

CryptoRodeo avatar Mar 28 '25 20:03 CryptoRodeo

@fjudith any idea about what could cause the issue?

vinzscam avatar Apr 08 '25 14:04 vinzscam

Do you only hit this error on start up? We've seen similar issues for the TechDocs collator. If you add a initial delay it should help.

awanlin avatar Apr 22 '25 14:04 awanlin

Thank you for the insight @awanlin,

There is a default initial delay sets to 30 seconds, is there any chance for a race condition between the search backend initialization and the confluence collator ?

https://github.com/backstage/community-plugins/blob/94366653e6792f271945b9f94857c79616cbfa76/workspaces/confluence/plugins/search-backend-module-confluence-collator/src/module.ts#L44

fjudith avatar Apr 30 '25 21:04 fjudith

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 30 '25 00:06 github-actions[bot]