Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scope search index manager to include analyze document #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chvck
Copy link
Contributor

@chvck chvck commented Jan 8, 2024

No description provided.

@@ -1563,6 +1563,7 @@ The SDK should not try to intercept a "bucket.scope.index" name and extract "ind
The implementation of `ScopeSearchIndexManager` is identical to `SearchIndexManagement`, except for the endpoints and some error handling details:

* `GetIndex`, `UpsertIndex`, `DropIndex`: use endpoint `/api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}` with GET, PUT and DELETE respectively.
* `AnalyzeDocument`: use endpoint `/api/index/{bucketName}.{scopeName}.{indexName}/analyzeDoc` with POST, there is no scoped endpoint for analyze document.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, really? May have a bug in the Java SDK then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently so, from elsewhere (and from someone else)

They told me:
so there isn’t a scoped endpoint for analyseDoc
you’ll have to provide the fully qualified index name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just seems to be a server bug - why have a scoped index endpoint for every operation except analyzeDoc?

@DemetrisChr
Copy link
Contributor

@programmatix Is the change suggested by this PR something we want to implement or do we want to still use the /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/analyzeDoc endpoint which is not currently provided by FTS?

@programmatix
Copy link
Contributor

@programmatix Is the change suggested by this PR something we want to implement or do we want to still use the /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/analyzeDoc endpoint which is not currently provided by FTS?

Someone needs to raise it with FTS I think. It seems at the very least downright odd that only one endpoint is missing a scoped variant.

@DemetrisChr
Copy link
Contributor

Someone needs to raise it with FTS I think. It seems at the very least downright odd that only one endpoint is missing a scoped variant.

I've filed an MB: https://issues.couchbase.com/browse/MB-60643

@DemetrisChr
Copy link
Contributor

The FTS team have now added a scoped endpoint for AnalyzeDocument (available from 7.6.2) so it should now be covered by the general rule:

  • For the other operations PauseIngest etc., the rule is: where the global index endpoint is /api/index/{indexName}/ingestControl/pause, the scoped index endpoint is /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/ingestControl/pause.

I think we can now close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants