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

Allow passing query between egress filter and filter gateway. #2097

Open
wants to merge 69 commits into
base: main
Choose a base branch
from

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Jun 29, 2023

Description:

This PR updated the following changes:

  • Allow passing query to egress filter through FilterDistance and FilterVector API
    • See apis/proto/v1/filter/egress/egress_filter.proto
  • Update Search APIs to allow filter searching result using query
    • For the logic, see pkg/gateway/filter/handler/grpc/handler.go
  • Updated existing Insert, Update, Upsert, GetObject API to allow filter object before corresponding operation
    • Updated to allow passing different query through multiple filtering target
  • Add example code, including example egress filter implementation, and example client code to connect to filter gateway using query filter feature.
    • See example/client/gateway/filter/README.md
  • Update related document about above changes.

Related Issue:

Versions:

  • Go Version: 1.20.3
  • Docker Version: 23.0.5
  • Kubernetes Version: 1.27.1
  • NGT Version: 2.0.9

Checklist:

Special notes for your reviewer:

You can check the behavior after this modification by reading the example/client/gateway/filter/README.md .

You may also need to edit the below file to enable filter gateway and setting the image tag to validate the implementation.

vim example/helm/values.yaml

gateway:
  filter:
    enabled: true
    image:
      tag: pr-2097

Please do not merge this PR, unless the target merge branch is updated.

Summary by CodeRabbit

  • New Features

    • Added support for new filter payload types: DistanceRequest, DistanceResponse, Query, VectorRequest, and VectorResponse.
    • Introduced query fields in filter configurations for enhanced filtering capabilities.
    • Implemented new gRPC methods for filtering distances and vectors.
  • Documentation

    • Updated API documentation to reflect new filter payload types and query fields.
    • Enhanced user guides with new filter configuration options and examples.
  • Chores

    • Expanded CI workflow triggers to include version updates for NGT.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@kevindiu kevindiu closed this Jun 29, 2023
@kevindiu kevindiu force-pushed the feature/egress-gateway/add-egress-query branch from f25941c to c05ffa7 Compare June 29, 2023 05:34
@kevindiu kevindiu reopened this Jun 29, 2023
@cloudflare-pages
Copy link

cloudflare-pages bot commented Jun 29, 2023

Deploying vald with  Cloudflare Pages  Cloudflare Pages

Latest commit: 844c7cb
Status: ✅  Deploy successful!
Preview URL: https://94d2939f.vald.pages.dev
Branch Preview URL: https://feature-egress-gateway-add-e.vald.pages.dev

View logs

@vdaas-ci
Copy link
Collaborator

[WARNING:INTCFG] Changes in interal/config may require you to change Helm charts. Please check.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

LanguageTool

docs/user-guides/client-api-config.md|647 col 39| This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Message
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING
example/client/gateway/filter/README.md|8 col 4| This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Gateway
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING
example/client/gateway/filter/README.md|11 col 4| This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Filter
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING
example/client/gateway/filter/README.md|13 col 4| This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Agent
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING
example/client/gateway/filter/README.md|22 col 13| Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: vald
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC
example/client/gateway/filter/README.md|47 col 61| This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Go
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

docs/overview/component/filter-gateway.md Show resolved Hide resolved
docs/overview/component/filter-gateway.md Show resolved Hide resolved
docs/overview/component/filter-gateway.md Show resolved Hide resolved
docs/overview/component/filter-gateway.md Show resolved Hide resolved
docs/overview/component/filter-gateway.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Outdated Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Outdated Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Outdated Show resolved Hide resolved
docs/user-guides/client-api-config.md Outdated Show resolved Hide resolved
docs/user-guides/client-api-config.md Outdated Show resolved Hide resolved
docs/user-guides/client-api-config.md Outdated Show resolved Hide resolved
docs/user-guides/client-api-config.md Outdated Show resolved Hide resolved
example/client/gateway/filter/README.md Outdated Show resolved Hide resolved
example/client/gateway/filter/README.md Outdated Show resolved Hide resolved
example/client/gateway/filter/README.md Outdated Show resolved Hide resolved
example/client/gateway/filter/README.md Outdated Show resolved Hide resolved
example/client/gateway/filter/README.md Outdated Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
@github-actions github-actions bot removed the size/S label Jun 29, 2023
@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Attention: Patch coverage is 1.85185% with 636 lines in your changes missing coverage. Please review.

Project coverage is 18.58%. Comparing base (e6f7db4) to head (844c7cb).

Files Patch % Lines
pkg/gateway/filter/handler/grpc/handler.go 0.00% 463 Missing ⚠️
example/server/egress-filter/main.go 0.00% 53 Missing ⚠️
example/server/ingress-filter/main.go 0.00% 35 Missing ⚠️
apis/grpc/v1/payload/payload.pb.json.go 0.00% 20 Missing ⚠️
pkg/tools/benchmark/job/service/object.go 0.00% 19 Missing ⚠️
internal/config/benchmark.go 0.00% 14 Missing ⚠️
.../grpc/v1/filter/egress/egress_filter_vtproto.pb.go 0.00% 10 Missing ⚠️
internal/client/v1/client/filter/egress/client.go 0.00% 10 Missing ⚠️
pkg/gateway/filter/handler/grpc/option.go 0.00% 8 Missing ⚠️
pkg/gateway/filter/usecase/vald.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2097      +/-   ##
==========================================
- Coverage   18.92%   18.58%   -0.34%     
==========================================
  Files         565      567       +2     
  Lines       65221    66426    +1205     
==========================================
+ Hits        12342    12348       +6     
- Misses      52080    53280    +1200     
+ Partials      799      798       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kevindiu kevindiu requested a review from hlts2 June 29, 2023 08:52
@kevindiu kevindiu force-pushed the feature/egress-gateway/add-egress-query branch from 0d131ad to 114385d Compare June 29, 2023 08:55
@kevindiu kevindiu force-pushed the feature/egress-gateway/add-egress-query branch from dfdb51d to 21df055 Compare June 30, 2023 03:15
hlts2 and others added 3 commits May 13, 2024 21:13
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Hiroto Funakoshi <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Hiroto Funakoshi <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between a1cbcf0 and ca1b7fc.
Files selected for processing (1)
  • example/server/egress-filter/main.go (1 hunks)

example/server/egress-filter/main.go Show resolved Hide resolved
example/server/egress-filter/main.go Outdated Show resolved Hide resolved
example/server/egress-filter/main.go Outdated Show resolved Hide resolved
example/server/egress-filter/main.go Show resolved Hide resolved
dimension uint
)

func init() {
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
don't use init function (init)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between ca1b7fc and 42895ac.
Files selected for processing (1)
  • example/client/gateway/filter/main.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • example/client/gateway/filter/main.go

Port option specifies grpc server port of your egress filter. Default value is `8083`.
Dimension option specifies dimension size of vectors. Default value is `784`.
**/
flag.UintVar(&egressServerPort, "port", 8083, "server port")
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Magic number: 8083, in detected (gomnd)

Dimension option specifies dimension size of vectors. Default value is `784`.
**/
flag.UintVar(&egressServerPort, "port", 8083, "server port")
flag.UintVar(&dimension, "dimension", 784, "dimension size of vectors")
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Magic number: 784, in detected (gomnd)

Port option specifies grpc server port of your egress filter. Default value is `8083`.
Dimension option specifies dimension size of vectors. Default value is `784`.
**/
flag.UintVar(&egressServerPort, "port", 8083, "server port")
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Magic number: 8083, in detected (gomnd)

Dimension option specifies dimension size of vectors. Default value is `784`.
**/
flag.UintVar(&egressServerPort, "port", 8083, "server port")
flag.UintVar(&dimension, "dimension", 784, "dimension size of vectors")
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Magic number: 784, in detected (gomnd)

@@ -111,10 +112,18 @@ message Filter {
uint32 port = 2;
}

// Represent the filter query.
message Query {
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Message
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

// Represent the filter query.
message Query {
// The raw query string.
string query = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: String
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

@@ -235,10 +247,18 @@
uint32 port = 2;
}

// Represent the filter query.
message Query {
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Message
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

// Represent the filter query.
message Query {
// The raw query string.
string query = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: String
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

@@ -358,10 +381,18 @@
uint32 port = 2;
}

// Represent the filter query.
message Query {
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Message
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

// Represent the filter query.
message Query {
// The raw query string.
string query = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: String
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

@@ -576,10 +609,18 @@
uint32 port = 2;
}

// Represent the filter query.
message Query {
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Message
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

// Represent the filter query.
message Query {
// The raw query string.
string query = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: String
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

@@ -601,10 +642,18 @@
uint32 port = 2;
}

// Represent the filter query.
message Query {
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: Message
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

// Represent the filter query.
message Query {
// The raw query string.
string query = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Suggestions: String
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Outside diff range and nitpick comments (3)
example/server/egress-filter/main.go (1)

92-98: Clarify the filtering logic in FilterVector.

The comment "// Write your own logic" is too vague and does not provide clear guidance on what should be implemented. It would be beneficial to provide more detailed comments or examples of expected logic to help future developers understand the intended functionality.

docs/user-guides/client-api-config.md (2)

116-119: Clarify the expected format of the query string in the Query message.

The documentation for the query field in the Query message could be enhanced by specifying the expected format or constraints of the query string. This would help users understand how to construct their queries correctly.


251-255: Enhance the description of the query field in the Query message for the Update service.

The description of the query field could be improved by providing examples or more detailed information on how it is used within the context of the Update service. This would make the documentation more informative and useful for developers.

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 42895ac and ad034dc.
Files selected for processing (2)
  • docs/user-guides/client-api-config.md (15 hunks)
  • example/server/egress-filter/main.go (1 hunks)
Additional Context Used
LanguageTool (6)
docs/user-guides/client-api-config.md (6)

Near line 480: Specify a number, remove phrase, or simply use “many” or “numerous”
Context: ...ance when asynchronous aggregation from a large number of Agents and a huge number of threads. ...
Rule ID: LARGE_NUMBER_OF


Near line 573: Loose punctuation mark.
Context: ...positive integer. #### radius radius, the specific parameter for NGT, specifi...
Rule ID: UNLIKELY_OPENING_PUNCTUATION


Near line 576: To elevate your writing, try using a synonym here.
Context: ...etween accuracy and search speed. It is hard to set it depending on the dataset in m...
Rule ID: HARD_TO


Near line 576: The phrase ‘in many cases’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others.
Context: ...hard to set it depending on the dataset in many cases. The default value is infinity. When s...
Rule ID: IN_MANY_STYLE_CASES


Near line 587: Loose punctuation mark.
Context: ...process. #### epsilon epsilon, the specific parameter for NGT, specifi...
Rule ID: UNLIKELY_OPENING_PUNCTUATION


Near line 593: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... desirable to adjust this value within 0 - 0.3, it can also set a negative value (o...
Rule ID: DASH_RULE

Markdownlint (216)
docs/user-guides/client-api-config.md (216)

36: Column: 1
Hard tabs


37: Column: 1
Hard tabs


39: Column: 1
Hard tabs


40: Column: 1
Hard tabs


41: Column: 1
Hard tabs


45: Column: 1
Hard tabs


46: Column: 1
Hard tabs


47: Column: 1
Hard tabs


48: Column: 1
Hard tabs


49: Column: 1
Hard tabs


50: Column: 1
Hard tabs


51: Column: 1
Hard tabs


52: Column: 1
Hard tabs


53: Column: 1
Hard tabs


54: Column: 1
Hard tabs


56: Column: 1
Hard tabs


57: Column: 1
Hard tabs


58: Column: 1
Hard tabs


59: Column: 1
Hard tabs


60: Column: 1
Hard tabs


61: Column: 1
Hard tabs


62: Column: 1
Hard tabs


63: Column: 1
Hard tabs


64: Column: 1
Hard tabs


65: Column: 1
Hard tabs


66: Column: 1
Hard tabs


67: Column: 1
Hard tabs


68: Column: 1
Hard tabs


69: Column: 1
Hard tabs


70: Column: 1
Hard tabs


71: Column: 1
Hard tabs


72: Column: 1
Hard tabs


73: Column: 1
Hard tabs


74: Column: 1
Hard tabs


75: Column: 1
Hard tabs


76: Column: 1
Hard tabs


77: Column: 1
Hard tabs


78: Column: 1
Hard tabs


79: Column: 1
Hard tabs


80: Column: 1
Hard tabs


81: Column: 1
Hard tabs


82: Column: 1
Hard tabs


83: Column: 1
Hard tabs


84: Column: 1
Hard tabs


163: Column: 1
Hard tabs


164: Column: 1
Hard tabs


166: Column: 1
Hard tabs


167: Column: 1
Hard tabs


168: Column: 1
Hard tabs


172: Column: 1
Hard tabs


173: Column: 1
Hard tabs


174: Column: 1
Hard tabs


175: Column: 1
Hard tabs


176: Column: 1
Hard tabs


177: Column: 1
Hard tabs


178: Column: 1
Hard tabs


179: Column: 1
Hard tabs


180: Column: 1
Hard tabs


181: Column: 1
Hard tabs


183: Column: 1
Hard tabs


184: Column: 1
Hard tabs


185: Column: 1
Hard tabs


186: Column: 1
Hard tabs


187: Column: 1
Hard tabs


188: Column: 1
Hard tabs


189: Column: 1
Hard tabs


191: Column: 1
Hard tabs


192: Column: 1
Hard tabs


193: Column: 1
Hard tabs


194: Column: 1
Hard tabs


195: Column: 1
Hard tabs


196: Column: 1
Hard tabs


197: Column: 1
Hard tabs


198: Column: 1
Hard tabs


199: Column: 1
Hard tabs


200: Column: 1
Hard tabs


201: Column: 1
Hard tabs


202: Column: 1
Hard tabs


203: Column: 1
Hard tabs


204: Column: 1
Hard tabs


205: Column: 1
Hard tabs


206: Column: 1
Hard tabs


207: Column: 1
Hard tabs


208: Column: 1
Hard tabs


209: Column: 1
Hard tabs


210: Column: 1
Hard tabs


211: Column: 1
Hard tabs


298: Column: 1
Hard tabs


299: Column: 1
Hard tabs


301: Column: 1
Hard tabs


302: Column: 1
Hard tabs


303: Column: 1
Hard tabs


307: Column: 1
Hard tabs


308: Column: 1
Hard tabs


309: Column: 1
Hard tabs


310: Column: 1
Hard tabs


311: Column: 1
Hard tabs


312: Column: 1
Hard tabs


313: Column: 1
Hard tabs


314: Column: 1
Hard tabs


315: Column: 1
Hard tabs


316: Column: 1
Hard tabs


318: Column: 1
Hard tabs


319: Column: 1
Hard tabs


320: Column: 1
Hard tabs


321: Column: 1
Hard tabs


322: Column: 1
Hard tabs


323: Column: 1
Hard tabs


324: Column: 1
Hard tabs


325: Column: 1
Hard tabs


326: Column: 1
Hard tabs


327: Column: 1
Hard tabs


328: Column: 1
Hard tabs


329: Column: 1
Hard tabs


330: Column: 1
Hard tabs


331: Column: 1
Hard tabs


332: Column: 1
Hard tabs


333: Column: 1
Hard tabs


334: Column: 1
Hard tabs


335: Column: 1
Hard tabs


336: Column: 1
Hard tabs


337: Column: 1
Hard tabs


338: Column: 1
Hard tabs


339: Column: 1
Hard tabs


340: Column: 1
Hard tabs


341: Column: 1
Hard tabs


342: Column: 1
Hard tabs


343: Column: 1
Hard tabs


344: Column: 1
Hard tabs


491: Column: 1
Hard tabs


492: Column: 1
Hard tabs


494: Column: 1
Hard tabs


495: Column: 1
Hard tabs


496: Column: 1
Hard tabs


500: Column: 1
Hard tabs


501: Column: 1
Hard tabs


502: Column: 1
Hard tabs


503: Column: 1
Hard tabs


504: Column: 1
Hard tabs


505: Column: 1
Hard tabs


506: Column: 1
Hard tabs


507: Column: 1
Hard tabs


508: Column: 1
Hard tabs


509: Column: 1
Hard tabs


511: Column: 1
Hard tabs


512: Column: 1
Hard tabs


513: Column: 1
Hard tabs


514: Column: 1
Hard tabs


515: Column: 1
Hard tabs


516: Column: 1
Hard tabs


517: Column: 1
Hard tabs


518: Column: 1
Hard tabs


519: Column: 1
Hard tabs


520: Column: 1
Hard tabs


521: Column: 1
Hard tabs


522: Column: 1
Hard tabs


523: Column: 1
Hard tabs


524: Column: 1
Hard tabs


525: Column: 1
Hard tabs


526: Column: 1
Hard tabs


527: Column: 1
Hard tabs


528: Column: 1
Hard tabs


529: Column: 1
Hard tabs


530: Column: 1
Hard tabs


531: Column: 1
Hard tabs


532: Column: 1
Hard tabs


533: Column: 1
Hard tabs


534: Column: 1
Hard tabs


535: Column: 1
Hard tabs


536: Column: 1
Hard tabs


537: Column: 1
Hard tabs


538: Column: 1
Hard tabs


539: Column: 1
Hard tabs


540: Column: 1
Hard tabs


541: Column: 1
Hard tabs


542: Column: 1
Hard tabs


543: Column: 1
Hard tabs


544: Column: 1
Hard tabs


545: Column: 1
Hard tabs


546: Column: 1
Hard tabs


548: Column: 1
Hard tabs


549: Column: 1
Hard tabs


551: Column: 1
Hard tabs


552: Column: 1
Hard tabs


553: Column: 1
Hard tabs


554: Column: 1
Hard tabs


692: Column: 1
Hard tabs


693: Column: 1
Hard tabs


695: Column: 1
Hard tabs


696: Column: 1
Hard tabs


697: Column: 1
Hard tabs


701: Column: 1
Hard tabs


702: Column: 1
Hard tabs


703: Column: 1
Hard tabs


704: Column: 1
Hard tabs


705: Column: 1
Hard tabs


706: Column: 1
Hard tabs


707: Column: 1
Hard tabs


708: Column: 1
Hard tabs


709: Column: 1
Hard tabs


710: Column: 1
Hard tabs


712: Column: 1
Hard tabs


713: Column: 1
Hard tabs


714: Column: 1
Hard tabs


716: Column: 1
Hard tabs


717: Column: 1
Hard tabs


718: Column: 1
Hard tabs


719: Column: 1
Hard tabs


720: Column: 1
Hard tabs


721: Column: 1
Hard tabs


722: Column: 1
Hard tabs


723: Column: 1
Hard tabs


724: Column: 1
Hard tabs


725: Column: 1
Hard tabs


726: Column: 1
Hard tabs


727: Column: 1
Hard tabs

Additional comments not posted (3)
docs/user-guides/client-api-config.md (3)

385-389: Add error handling for Filter_Query initialization in the Upsert service.

- Query: &payload.Filter_Query{},
+ Query: &payload.Filter_Query{Query: "example upsert query"},

Similar to previous services, the Filter_Query in the Upsert service is initialized but not populated. Providing a default or example query would demonstrate its usage more effectively.

Likely invalid or redundant comment.


529-544: Verify the integration of Filter_Query in the Search service.

The example code includes Filter_Query but does not show how it integrates with the rest of the Search service. Verifying its usage and integration can help ensure that it functions as expected within this context.


196-202: Consider handling potential errors from Filter_Query initialization.

The example code initializes Filter_Query but does not demonstrate how to handle potential errors that might arise during this process. It would be beneficial to include error handling to ensure robustness.

example/server/egress-filter/main.go Show resolved Hide resolved
example/server/egress-filter/main.go Show resolved Hide resolved
example/server/egress-filter/main.go Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
docs/user-guides/client-api-config.md Show resolved Hide resolved
hlts2 and others added 3 commits June 10, 2024 12:41
This commit fixes the style issues introduced in 799a5f1 according to the output
from Gofumpt and Prettier.

Details: #2097
| filters | Filter.Config | | | Configuration for filter. |
| field | type | label | required | description |
| :-----: | :---------------------------- | :---- | :------: | :------------------------------------------------------------- |
| id | Object.ID | | \* | The ID of a vector. ID should consist of 1 or more characters. |
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

| filters | Filter.Config | | | Configuration for filter. |
| field | type | label | required | description |
| :-----: | :---------------------------- | :---- | :------: | :------------------------------------------------------------- |
| id | Object.ID | | \* | The ID of a vector. ID should consist of 1 or more characters. |
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

| field | type | label | required | description |
| :-----: | :---------------------------- | :---- | :------: | :------------------------------------------------------------- |
| id | Object.ID | | \* | The ID of a vector. ID should consist of 1 or more characters. |
| filters | repeated(Array[Filter.Config] | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Unpaired symbol: ‘)’ seems to be missing (EN_UNPAIRED_BRACKETS)
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses
Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_BRACKETS?lang=en-US
Category: PUNCTUATION

| filters | Filter.Config | | | Configuration for the filter targets. |
| field | type | label | required | description |
| :-----: | :----------------------------- | :---- | :------: | :------------------------------------------------------------- |
| id | Object.ID | | \* | The ID of a vector. ID should consist of 1 or more characters. |
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

| filters | Filter.Config | | | Configuration for the filter targets. |
| field | type | label | required | description |
| :-----: | :----------------------------- | :---- | :------: | :------------------------------------------------------------- |
| id | Object.ID | | \* | The ID of a vector. ID should consist of 1 or more characters. |
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

documents testlint

docs/api/update.md|167 col 57| nfig => fig (en-spell)
docs/api/update.md|307 col 57| nfig => fig (en-spell)
docs/api/upsert.md|64 col 57| nfig => fig (en-spell)
docs/api/upsert.md|169 col 57| nfig => fig (en-spell)
docs/api/upsert.md|307 col 57| nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| field | type | label | required | description |
| :-----: | :---------------------------- | :---- | :------: | :------------------------------------------------------------- |
| id | Object.ID | | \* | The ID of a vector. ID should consist of 1 or more characters. |
| filters | repeated(Array[Filter.Config] | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| field | type | label | required | description |
| :-----: | :----------------------------- | :---- | :------: | :------------------------------------------------------------- |
| id | Object.ID | | \* | The ID of a vector. ID should consist of 1 or more characters. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for the filter targets. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| request_id | string | | | Unique request ID. |
| num | uint32 | | \* | The maximum number of results to be returned. |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| num | uint32 | | \* | The maximum number of results to be returned. |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
| egress_filters | repeated(Array[Filter.Config]) | | | Egress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| request_id | string | | | Unique request ID. |
| num | uint32 | | \* | The maximum number of results to be returned. |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| num | uint32 | | \* | The maximum number of results to be returned. |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
| egress_filters | repeated(Array[Filter.Config]) | | | Egress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| radius | float | | \* | The search radius. |
| epsilon | float | | \* | The search coefficient (default value is `0.1`). |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| epsilon | float | | \* | The search coefficient (default value is `0.1`). |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
| egress_filters | repeated(Array[Filter.Config]) | | | Egress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| radius | float | | \* | The search radius. |
| epsilon | float | | \* | The search coefficient (default value is `0.1`). |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| epsilon | float | | \* | The search coefficient (default value is `0.1`). |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
| egress_filters | repeated(Array[Filter.Config]) | | | Egress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| radius | float | | \* | The search radius. |
| epsilon | float | | \* | The search coefficient (default value is `0.1`). |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`). |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

hlts2 and others added 2 commits June 10, 2024 18:23
This commit fixes the style issues introduced in 266f35b according to the output
from Gofumpt and Prettier.

Details: #2097
message Config {
repeated Target targets = 1;
Target target = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Target
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Query query = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Query
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Target
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Query query = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Query
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Target
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Query query = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Query
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Target
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Query query = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Query
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Target
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

message Config {
repeated Target targets = 1;
Target target = 1;
Query query = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: Query
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

| disable_balanced_update | bool | | | A flag to disable balanced update (split remove -&gt; insert operation) during update operation. |
| field | type | label | required | desc. |
| :---------------------: | :----------------------------- | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already upserted or not.<br>the ID should be unique if the value is `true`. |
Copy link
Contributor

Choose a reason for hiding this comment

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

[documents cspell] reported by reviewdog 🐶
Unknown word (upserted) Suggestions: [upsert, unseated, unserved, unsorted, upsetter]

| field | type | label | required | desc. |
| :---------------------: | :----------------------------- | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already upserted or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector upserted.<br>if it is N/A, the current time will be used. |
Copy link
Contributor

Choose a reason for hiding this comment

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

[documents cspell] reported by reviewdog 🐶
Unknown word (upserted) Suggestions: [upsert, unseated, unserved, unsorted, upsetter]

| :---------------------: | :----------------------------- | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |

- Filter.Config
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |

- Filter.Config
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :--------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already inserted or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector inserted.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)


| field | type | label | required | desc. |
| :---: | :----- | :---- | :------: | :------------------ |
| host | string | | \* | the target hostname |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
hostname => hostage (en-spell)

| radius | float | | \* | the search radius |
| epsilon | float | | \* | the search coefficient (default value is `0.1`) |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`) |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| epsilon | float | | \* | the search coefficient (default value is `0.1`) |
| timeout | int64 | | | Search timeout in nanoseconds (default value is `5s`) |
| ingress_filters | repeated(Array[Filter.Config]) | | | Ingress Filter configuration |
| egress_filters | repeated(Array[Filter.Config]) | | | Egress Filter configuration |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| egress_filters | repeated(Array[Filter.Config]) | | | Egress Filter configuration |
| min_num | uint32 | | | the minimum number of result to be returned |

- Filter.Config
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)


| field | type | label | required | desc. |
| :---: | :----- | :---- | :------: | :------------------ |
| host | string | | \* | the target hostname |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
hostname => hostage (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :-------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already updated or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector updated.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :-------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already updated or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector updated.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

| :---------------------: | :----------------------------- | :---- | :------: | :-------------------------------------------------------------------------------------------------- |
| skip_strict_exist_check | bool | | | check the same vector is already updated or not.<br>the ID should be unique if the value is `true`. |
| timestamp | int64 | | | the timestamp of the vector updated.<br>if it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | configuration for filter |
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [documents testlint] <eslint.rules.en-spell> reported by reviewdog 🐶
nfig => fig (en-spell)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range and nitpick comments (5)
docs/api/object.md (2)

98-98: Consider using a more descriptive field name for filters.

The field name filters is quite generic. Consider using a more descriptive name that indicates the type of filters or their purpose in the context of the API, such as vectorFilters or queryFilters.

Also applies to: 179-179


112-112: Clarify the description for the filters field.

The current description for the filters field is "Configuration for filter." This could be expanded to provide more detail about what the filters are used for, such as "Configuration for filtering search results based on specific criteria."

Also applies to: 193-193

docs/api/insert.md (1)

34-34: Ensure the filters field is adequately described.

The description for the filters field could be enhanced to better explain its role. Consider revising it to something like: "List of configurations for applying various filters on the vector data before insertion."

Also applies to: 138-138, 269-269

docs/api/upsert.md (2)

38-38: Improve clarity of the filters field description.

The description for the filters field is minimal. Enhancing this description could improve understanding of its functionality. Suggested revision: "Defines the filters to be applied to the vector data during the upsert operation."

Also applies to: 143-143, 275-275


65-65: Clarify the purpose of disable_balanced_update.

The field disable_balanced_update could benefit from a more detailed description. Consider explaining what a "balanced update" entails and the implications of disabling it.

Also applies to: 170-170, 308-308

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ad034dc and cafd16e.

Files selected for processing (5)
  • docs/api/insert.md (6 hunks)
  • docs/api/object.md (4 hunks)
  • docs/api/search.md (24 hunks)
  • docs/api/update.md (6 hunks)
  • docs/api/upsert.md (6 hunks)
Additional context used
LanguageTool
docs/api/insert.md

[uncategorized] ~4-~4: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: # Vald Insert APIs ## Overview Insert Service is responsible for inserting ne...


[style] ~124-~124: Specify a number, remove phrase, or simply use “many” or “numerous” (LARGE_NUMBER_OF)
Context: .... It's the recommended method to insert a large number of vectors. ### Input - the scheme of `p...


[uncategorized] ~330-~330: The grammatical number of this noun doesn’t look right. Consider replacing it. (AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
Context: ...d(Array[Object.Location]) | The list of Object.Location. | - Object.Location ...

docs/api/upsert.md

[uncategorized] ~4-~4: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: # Vald Upsert APIs ## Overview Upsert Service is responsible for updating exi...


[uncategorized] ~70-~70: A punctuation mark might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION)
Context: ...--------------------------------------- | | id | string | ...


[style] ~129-~129: Specify a number, remove phrase, or simply use “many” or “numerous” (LARGE_NUMBER_OF)
Context: .... It’s the recommended method to upsert a large number of vectors. ### Input - the scheme of `p...


[uncategorized] ~175-~175: A punctuation mark might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION)
Context: ...--------------------------------------- | | id | string | ...


[uncategorized] ~313-~313: A punctuation mark might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION)
Context: ...--------------------------------------- | | id | string | ...


[uncategorized] ~337-~337: The grammatical number of this noun doesn’t look right. Consider replacing it. (AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
Context: ...d(Array[Object.Location]) | The list of Object.Location. | - Object.Location ...

docs/api/update.md

[grammar] ~119-~119: An article may be missing. (BUNCH_OF)
Context: ... | | ALREADY_EXISTS | Request pair of ID and vector is already inserted. ...


[uncategorized] ~127-~127: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case. (AMOUNTOF_TO_NUMBEROF)
Context: ... recommended method to update the large amount of vectors. ### Input - the scheme of...


[grammar] ~248-~248: An article may be missing. (BUNCH_OF)
Context: ... | | ALREADY_EXISTS | Request pair of ID and vector is already inserted. ...


[style] ~337-~337: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...d(Array[Object.Location]) | The list of Object.Location. | - Object.Location | field |...


[grammar] ~374-~374: An article may be missing. (BUNCH_OF)
Context: ... | | ALREADY_EXISTS | Request pair of ID and vector is already inserted. ...

Additional comments not posted (20)
docs/api/update.md (6)

34-34: Ensure the filters field is correctly documented as an array of Filter.Config.


56-61: The documentation for the Update.Config table is clear and well-structured.


141-141: Verify that the filters field is consistently documented across different RPC methods.


163-168: The documentation for the Update.Config in the StreamUpdate RPC method is consistent with the single update method, which is good for maintaining uniformity.


275-275: Ensure that the filters field in the MultiUpdate RPC method is correctly documented as an array of Filter.Config.


303-308: The documentation for the Update.Config in the MultiUpdate RPC method is consistent and clear.

docs/api/search.md (14)

66-67: Ensure the new filter configurations are correctly documented.

The addition of ingress_filters and egress_filters as repeated fields in the Search.Config message aligns with the PR's objective to enhance filtering capabilities. Make sure the implementation matches this configuration.


187-188: Confirm the repeated filter configurations in Search.IDRequest.

The documentation correctly reflects the addition of ingress_filters and egress_filters as repeated fields in the Search.IDRequest configuration. This should allow for more dynamic filtering based on the request.


309-310: Review the addition of filter configurations in StreamSearch.

The documentation update to include ingress_filters and egress_filters in the StreamSearch RPC configuration is in line with the PR's goals to enhance filtering capabilities across different search methods.


445-446: Validate the filter configurations in StreamSearchByID.

The updates to include ingress_filters and egress_filters in the StreamSearchByID RPC configuration are correctly documented, enhancing the filtering capabilities as intended in the PR.


588-589: Review the documentation of filter configurations in MultiSearch.

The addition of ingress_filters and egress_filters as repeated fields in the MultiSearch RPC configuration is accurately documented, aligning with the PR's objectives.


734-735: Confirm the filter configurations in MultiSearchByID.

The documentation update to include ingress_filters and egress_filters in the MultiSearchByID RPC configuration is correctly done, enhancing the filtering capabilities as intended.


868-869: Review the documentation of filter configurations in LinearSearch.

The updates to include ingress_filters and egress_filters in the LinearSearch RPC configuration are correctly documented, enhancing the filtering capabilities as intended in the PR.


91-101: Validate the completeness and accuracy of the table entries for Search.Config.

Ensure that each field listed in the table is implemented according to the specifications provided here, especially the new ingress_filters and egress_filters.

Verification successful

The table entries for Search.Config in the documentation are complete and accurate. The fields listed in the table match the fields found in the implementation examples across various documentation files.

  • request_id
  • num
  • radius
  • epsilon
  • timeout
  • ingress_filters
  • egress_filters
  • min_num
  • aggregation_algorithm
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all fields in Search.Config are implemented as described.

# Test: Search for the implementation of each field in the Search service.
rg --type md "Search.Config" -A 20

Length of output: 51645


893-901: Ensure the LinearSearch configuration table is accurate and complete.

This verification is crucial to ensure that the documentation accurately reflects the implementation, especially for the newly added filter configurations.

Verification successful

The search results indicate that the configuration table for LinearSearch in the documentation is accurate and complete. The fields listed in the table match those found in the documented configuration in the codebase.

  • The fields request_id, num, timeout, ingress_filters, egress_filters, min_num, and aggregation_algorithm are all present and correctly described in the documentation.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the accuracy of the LinearSearch configuration table.

# Test: Check the LinearSearch configuration implementation in the code.
rg --type md "LinearSearch" -A 30

Length of output: 23599


212-222: Check for consistency in the description and implementation of Search.IDRequest.

Verify that the fields and their descriptions in Search.IDRequest match the actual implementation and usage in the codebase.

Verification successful

Let's proceed by locating the actual implementation of Search.IDRequest and Search.Config in the codebase to ensure consistency with the documentation.


Let's proceed by using rg to search for the definitions of Search.IDRequest and Search.Config in the codebase.


Let's proceed by first locating all .proto files using fd and then searching within these files for the definitions of Search.IDRequest and Search.Config.


Let's proceed by using fd and xargs to pipe the list of .proto files directly to rg for searching the definitions of Search.IDRequest and Search.Config.


The definitions of Search.IDRequest and Search.Config have been successfully located in the apis/proto/v1/payload/payload.proto file. Here are the relevant details:

  • Search.IDRequest:

    message IDRequest {
      // The vector ID to be searched.
      string id = 1;
      // The configuration of the search request.
      Config config = 2;
    }
  • Search.Config:

    message Config {
      // Unique request ID.
      string request_id = 1;
      // Maximum number of result to be returned.
      uint32 num = 2 [(buf.validate.field).uint32.gte = 1];
      // Search radius.
      float radius = 3;
      // Search coefficient.
      float epsilon = 4;
      // Search timeout in nanoseconds.
      int64 timeout = 5;
      // Ingress filter configurations.
      repeated Filter.Config ingress_filters = 6;
      // Egress filter configurations.
      repeated Filter.Config egress_filters = 7;
      // Minimum number of result to be returned.
      uint32 min_num = 8 [(buf.validate.field).uint32.gte = 0];
      // Aggregation Algorithm
      AggregationAlgorithm aggregation_algorithm = 9;
      // Search ratio for agent return result number.
      google.protobuf.FloatValue ratio = 10;
    }

The fields and descriptions in the documentation match the actual implementation in the codebase. Therefore, the documentation is consistent with the implementation.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Ensure that the Search.IDRequest fields are consistently implemented.

# Test: Search for the usage of Search.IDRequest in the codebase.
rg --type md "Search.IDRequest" -A 20

Length of output: 29883



Script:

#!/bin/bash
# Locate the definition of Search.IDRequest and Search.Config in the codebase.
ast-grep --lang proto --pattern $'message IDRequest {
  $$$
}' 

ast-grep --lang proto --pattern $'message Config {
  $$$
}' 

Length of output: 346



Script:

#!/bin/bash
# Search for the definition of Search.IDRequest in the codebase.
rg --type proto "message IDRequest" -A 20

# Search for the definition of Search.Config in the codebase.
rg --type proto "message Config" -A 20

Length of output: 144



Script:

#!/bin/bash
# Find all .proto files in the codebase.
fd --extension proto > proto_files.txt

# Search for the definition of Search.IDRequest in the .proto files.
rg "message IDRequest" -A 20 -f proto_files.txt

# Search for the definition of Search.Config in the .proto files.
rg "message Config" -A 20 -f proto_files.txt

Length of output: 232



Script:

#!/bin/bash
# Find all .proto files and search for the definition of Search.IDRequest.
fd --extension proto | xargs rg "message IDRequest" -A 20

# Find all .proto files and search for the definition of Search.Config.
fd --extension proto | xargs rg "message Config" -A 20

Length of output: 9635


470-480: Check the consistency and completeness of StreamSearchByID configuration.

This check is essential to confirm that the fields and their descriptions in the StreamSearchByID configuration match the actual implementation and usage in the codebase.

Verification successful

The IDRequest message definition has been successfully retrieved. Here are the fields:

  • string id = 1;
  • Config config = 2;

To verify the consistency and completeness of the StreamSearchByID configuration, we need to compare these fields with the documented fields in docs/api/search.md. The Config message should also be verified for completeness.


The Config message definition has been successfully retrieved. Here are the fields:

  • string request_id = 1;
  • uint32 num = 2 [(buf.validate.field).uint32.gte = 1];
  • float radius = 3;
  • float epsilon = 4;
  • int64 timeout = 5;
  • repeated Filter.Config ingress_filters = 6;
  • repeated Filter.Config egress_filters = 7;
  • uint32 min_num = 8 [(buf.validate.field).uint32.gte = 0];
  • AggregationAlgorithm aggregation_algorithm = 9;
  • google.protobuf.FloatValue ratio = 10;

Comparing these fields with the documented fields in docs/api/search.md, we can confirm that the documentation is consistent and complete with the actual implementation.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Ensure that the StreamSearchByID configuration is consistently implemented.

# Test: Search for the usage of StreamSearchByID in the codebase.
rg --type md "StreamSearchByID" -A 20

Length of output: 9756



Script:

#!/bin/bash
# Extract the definition of the Search.IDRequest message from the codebase to verify its fields.
ast-grep --lang proto --pattern 'message IDRequest { $$$ }'

Length of output: 172



Script:

#!/bin/bash
# Search for the definition of the IDRequest message in the protobuf files.
rg --type proto 'message IDRequest {'

Length of output: 141



Script:

#!/bin/bash
# Search for the definition of the IDRequest message in the protobuf files with corrected regex pattern.
rg --type proto 'message IDRequest \{'

Length of output: 70



Script:

#!/bin/bash
# Find all .proto files and search for the definition of the IDRequest message within those files.
fd -e proto -x rg 'message IDRequest \{' {}

Length of output: 69



Script:

#!/bin/bash
# Find all .proto files and display the file path and content of the IDRequest message definition.
fd -e proto -x rg 'message IDRequest \{' -A 20 {}

Length of output: 659



Script:

#!/bin/bash
# Search for the definition of the Config message in the protobuf files.
fd -e proto -x rg 'message Config \{' -A 20 {}

Length of output: 3671


765-775: Check the consistency and completeness of MultiSearchByID configuration.

This check is essential to confirm that the fields and their descriptions in the MultiSearchByID configuration match the actual implementation and usage in the codebase.

Verification successful

The MultiSearchByID configuration is consistently implemented and documented across the codebase. The fields and descriptions in the documentation match the actual implementation.

  • MultiSearchByID is referenced in multiple files, including docs/api/search.md, apis/proto/v1/vald/search.proto, and various handler and test files.
  • The fields and descriptions in the documentation align with the implementation details found in the codebase.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Ensure that the MultiSearchByID configuration is consistently implemented.

# Test: Search for the usage of MultiSearchByID in the codebase.
rg --type md "MultiSearchByID" -A 20

Length of output: 9152



Script:

#!/bin/bash
# Description: Verify the consistency of the MultiSearchByID configuration in the codebase.

# Test: Search for the definition of MultiSearchByID in the codebase.
rg "MultiSearchByID" -A 20

Length of output: 100324


619-629: Ensure the MultiSearch configuration table is accurate and complete.

This verification is crucial to ensure that the documentation accurately reflects the implementation, especially for the newly added filter configurations.

Verification successful

The MultiSearch configuration table in the documentation is accurate and complete. The fields listed in the table match the fields defined in the MultiSearch input schema.

  • request_id
  • num
  • radius
  • epsilon
  • timeout
  • ingress_filters
  • egress_filters
  • min_num
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the accuracy of the MultiSearch configuration table.

# Test: Check the MultiSearch configuration implementation in the code.
rg --type md "MultiSearch" -A 30

Length of output: 19585


334-344: Ensure the StreamSearch configuration table is accurate and complete.

This verification is crucial to ensure that the documentation accurately reflects the implementation, especially for the newly added filter configurations.

Verification successful

The StreamSearch configuration table in the documentation appears to be accurate and complete based on the provided implementation details. The fields listed in the table match those in the Config message of the StreamSearch RPC.

  • request_id
  • num
  • radius
  • epsilon
  • timeout
  • ingress_filters
  • egress_filters
  • min_num
  • aggregation_algorithm

These fields are all present in the Config message, and their descriptions align with the implementation.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the accuracy of the StreamSearch configuration table.

# Test: Check the StreamSearch configuration implementation in the code.
rg --type md "StreamSearch" -A 30

Length of output: 20579

docs/api/object.md Show resolved Hide resolved
docs/api/insert.md Show resolved Hide resolved
docs/api/upsert.md Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Outside diff range and nitpick comments (3)
docs/api/filter-gateway.md (3)

Line range hint 271-271: Capitalize "Google" in the description of google.rpc.Status.

- the status of google RPC.
+ the status of Google RPC.

The term "Google" should be capitalized as it is a proper noun. This change should be applied wherever the term appears in the context of Google RPC.

Also applies to: 716-716, 1164-1164, 1622-1622


Line range hint 594-594: Clarify the description for updating a large number of objects.

The phrase "large amount of objects" could be clearer. Consider rephrasing to "large number of objects" to align with the correct usage of countable nouns.


Line range hint 7-7: Add a comma for clarity in the overview section.

- Filter components allowing user to run custom logic.
+ Filter components, allowing user to run custom logic.

Adding a comma after "components" improves the readability of the sentence by clearly separating the clauses.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ad034dc and 844c7cb.

Files selected for processing (6)
  • docs/api/filter-gateway.md (45 hunks)
  • docs/api/insert.md (6 hunks)
  • docs/api/object.md (4 hunks)
  • docs/api/search.md (24 hunks)
  • docs/api/update.md (6 hunks)
  • docs/api/upsert.md (6 hunks)
Additional context used
LanguageTool
docs/api/insert.md

[style] ~124-~124: Specify a number, remove phrase, or simply use “many” or “numerous” (LARGE_NUMBER_OF)
Context: .... It's the recommended method to insert a large number of vectors. ### Input - the scheme of `p...


[style] ~330-~330: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...d(Array[Object.Location]) | The list of Object.Location. | - Object.Location | field |...

docs/api/upsert.md

[style] ~129-~129: Specify a number, remove phrase, or simply use “many” or “numerous” (LARGE_NUMBER_OF)
Context: .... It’s the recommended method to upsert a large number of vectors. ### Input - the scheme of `p...


[style] ~337-~337: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...d(Array[Object.Location]) | The list of Object.Location. | - Object.Location | field |...

docs/api/update.md

[grammar] ~119-~119: An article may be missing. (BUNCH_OF)
Context: ... | | ALREADY_EXISTS | Request pair of ID and vector is already inserted. ...


[uncategorized] ~127-~127: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case. (AMOUNTOF_TO_NUMBEROF)
Context: ... recommended method to update the large amount of vectors. ### Input - the scheme of...


[grammar] ~248-~248: An article may be missing. (BUNCH_OF)
Context: ... | | ALREADY_EXISTS | Request pair of ID and vector is already inserted. ...


[style] ~337-~337: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...d(Array[Object.Location]) | The list of Object.Location. | - Object.Location | field |...


[grammar] ~374-~374: An article may be missing. (BUNCH_OF)
Context: ... | | ALREADY_EXISTS | Request pair of ID and vector is already inserted. ...

docs/api/filter-gateway.md

[uncategorized] ~7-~7: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...t to user-defined ingress/egress filter components allowing user to run custom logic. ## ...


[style] ~150-~150: Specify a number, remove phrase, or simply use “many” or “numerous” (LARGE_NUMBER_OF)
Context: .... It's the recommended method to insert a large number of objects. ```rpc service Filter { rpc...


[grammar] ~271-~271: “Google” is a proper noun and needs to be capitalized. (A_GOOGLE)
Context: ...ogle.rpc.Status | | the status of google RPC. | - Object.Loc...


[style] ~432-~432: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...d(Array[Object.Location]) | the list of Object.Location. | - Object.Location | field |...


[uncategorized] ~594-~594: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case. (AMOUNTOF_TO_NUMBEROF)
Context: ... recommended method to update the large amount of objects. ```rpc service Filter { ...


[grammar] ~716-~716: “Google” is a proper noun and needs to be capitalized. (A_GOOGLE)
Context: ...ogle.rpc.Status | | the status of google RPC. | - Object.Loc...


[style] ~883-~883: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...d(Array[Object.Location]) | the list of Object.Location. | - Object.Location | field |...


[grammar] ~1164-~1164: “Google” is a proper noun and needs to be capitalized. (A_GOOGLE)
Context: ...ogle.rpc.Status | | the status of google RPC. | - Object.Loc...


[style] ~1331-~1331: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...d(Array[Object.Location]) | the list of Object.Location. | - Object.Location | field |...


[grammar] ~1622-~1622: “Google” is a proper noun and needs to be capitalized. (A_GOOGLE)
Context: ...ogle.rpc.Status | | the status of google RPC | - Search.Response | f...

Additional comments not posted (35)
docs/api/object.md (2)

98-98: LGTM! The addition of repeated Filter.Config filters enhances the filtering capabilities of the GetObject RPC.

Consider adding examples or more detailed documentation on how these filters can be used effectively in different scenarios.

Also applies to: 112-112


179-179: LGTM! Consistent addition of repeated Filter.Config filters in the StreamGetObject RPC maintains uniformity with GetObject RPC.

Ensure that the implementation handles these filters correctly in the streaming context, particularly with respect to maintaining state and performance.

Also applies to: 193-193

docs/api/insert.md (3)

34-34: LGTM! The addition of repeated Filter.Config filters in the Insert RPC enhances the API's functionality by allowing conditional inserts based on filters.

Consider adding examples or more detailed documentation on how these filters can be utilized during insert operations to guide users effectively.

Also applies to: 60-60


138-138: LGTM! Consistent addition of repeated Filter.Config filters in the StreamInsert RPC maintains uniformity with Insert RPC.

Ensure that the implementation handles these filters correctly in the streaming context, particularly with respect to maintaining state and performance.

Also applies to: 164-164


269-269: LGTM! Consistent addition of repeated Filter.Config filters in the MultiInsert RPC maintains uniformity with other insert operations.

Ensure that the implementation handles these filters correctly in the multi-request context, particularly with respect to performance and correctness in batch operations.

Also applies to: 301-301

docs/api/upsert.md (3)

38-38: LGTM! The addition of repeated Filter.Config filters and disable_balanced_update in the Upsert RPC enhances configurability and functionality.

Consider adding detailed documentation on the use and impact of disable_balanced_update, especially how it affects the update operations in terms of performance and data consistency.

Also applies to: 64-65


143-143: LGTM! Consistent addition of repeated Filter.Config filters and disable_balanced_update in the StreamUpsert RPC maintains uniformity with Upsert RPC.

Ensure that the implementation handles these configurations correctly in the streaming context, particularly with respect to maintaining state and performance.

Also applies to: 169-170


275-275: LGTM! Consistent addition of repeated Filter.Config filters and disable_balanced_update in the MultiUpsert RPC maintains uniformity with other upsert operations.

Ensure that the implementation handles these configurations correctly in the multi-request context, particularly with respect to performance and correctness in batch operations.

Also applies to: 307-308

docs/api/update.md (3)

34-34: Ensure the repeated Filter.Config filters field is correctly documented.

This change aligns with the PR's objective to enhance filter configurations across various APIs.


141-141: Verify the repeated use of Filter.Config in the StreamUpdate RPC.


275-275: Confirm the implementation of repeated Filter.Config in the MultiUpdate RPC.

docs/api/search.md (24)

66-67: Updated the Search.Request configuration to include repeated keyword for ingress_filters and egress_filters. This change allows multiple filter configurations, enhancing flexibility in search queries.


91-101: Updated the table under Search.Config to reflect the new structure of ingress_filters and egress_filters as arrays. This change aligns with the updated RPC schema and provides clarity on the configuration options available to users.


187-188: Similar to the Search RPC, the SearchByID RPC now also supports multiple ingress and egress filters. This consistency across RPC methods improves the user's ability to apply uniform filtering logic across different types of search operations.


212-222: The table under Search.IDRequest has been updated to match the new repeated filter configuration. This ensures that the documentation is consistent with the actual functionality of the API.


309-310: The StreamSearch RPC configuration now also includes the repeated keyword for filter configurations, allowing for multiple filter criteria during streaming search operations. This enhancement supports more complex query scenarios.


334-344: Updated the table under StreamSearch to accurately reflect the changes in filter configurations. This update ensures that the documentation provides clear and accurate information to developers using the streaming search functionality.


445-446: The StreamSearchByID RPC has been updated to include multiple filter configurations, aligning it with other search RPCs. This change facilitates more flexible and powerful search operations based on vector IDs.


470-480: The table under StreamSearchByID has been updated to reflect the new repeated filter configuration. This consistency in documentation helps users understand the capabilities and configuration options of the API.


588-589: The MultiSearch RPC now supports multiple ingress and egress filters, enhancing the ability to perform complex searches within a single request. This change broadens the use cases and flexibility of the search functionality.


619-629: Updated the table under MultiSearch to include the new repeated filter configurations. This update ensures that the documentation is comprehensive and reflects the actual capabilities of the API.


734-735: The MultiSearchByID RPC configuration now includes multiple filter configurations, providing consistency across different search methods and enhancing the flexibility of ID-based searches.


765-775: Updated the table under MultiSearchByID to reflect the new repeated filter configuration. This ensures that the documentation is accurate and provides users with the correct information on how to configure their search queries.


868-869: The LinearSearch RPC now supports multiple ingress and egress filters, aligning it with other search RPCs and enhancing its functionality.


893-901: Updated the table under LinearSearch to reflect the new repeated filter configurations. This update ensures that the documentation is accurate and provides clear guidance on configuring linear search operations.


986-987: The LinearSearchByID RPC configuration now includes multiple filter configurations, providing consistency across different search methods and enhancing the flexibility of ID-based searches.


1011-1019: Updated the table under LinearSearchByID to reflect the new repeated filter configuration. This ensures that the documentation is accurate and provides users with the correct information on how to configure their search queries.


1104-1105: The StreamLinearSearch RPC now supports multiple ingress and egress filters, enhancing the flexibility and functionality of streaming linear search operations.


1129-1137: Updated the table under StreamLinearSearch to reflect the new repeated filter configurations. This update ensures that the documentation is comprehensive and reflects the actual capabilities of the API.


1236-1237: The StreamLinearSearchByID RPC configuration now includes multiple filter configurations, providing consistency across different search methods and enhancing the flexibility of ID-based searches.


1261-1269: Updated the table under StreamLinearSearchByID to reflect the new repeated filter configuration. This ensures that the documentation is accurate and provides users with the correct information on how to configure their search queries.


1375-1376: The MultiLinearSearch RPC now supports multiple ingress and egress filters, enhancing the ability to perform complex searches within a single request. This change broadens the use cases and flexibility of the search functionality.


1406-1414: Updated the table under MultiLinearSearch to include the new repeated filter configurations. This update ensures that the documentation is comprehensive and reflects the actual capabilities of the API.


1517-1518: The MultiLinearSearchByID RPC configuration now includes multiple filter configurations, providing consistency across different search methods and enhancing the flexibility of ID-based searches.


1548-1556: Updated the table under MultiLinearSearchByID to reflect the new repeated filter configuration. This ensures that the documentation is accurate and provides users with the correct information on how to configure their search queries.

@@ -36,7 +36,7 @@ service Filter {

message Config {
bool skip_strict_exist_check = 1;
Filter.Config filters = 2;
repeated Filter.Config filters = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure consistency in the use of repeated filter configurations across all RPC methods.

The repeated use of Filter.Config in various RPC methods ensures uniformity in handling filters across different operations. However, ensure that all client and server code that interacts with these RPC methods is updated to handle these changes correctly.

Also applies to: 57-63, 85-96, 173-197, 219-230, 334-358, 386-397, 483-507, 617-641, 784-808, 934-958, 1065-1089, 1232-1256, 1386-1404, 1526-1544, 1692-1710

Comment on lines +57 to +63
message Query {
string query = 1;
}

message Config {
repeated Target targets = 1;
Target target = 1;
Query query = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Refactor to consolidate the definition of Filter.Query.

The Filter.Query message is defined multiple times across different RPC services. Consider defining it once at a higher level and referencing it in the RPC services to reduce redundancy and potential inconsistencies.

Also applies to: 191-197, 352-358, 501-507, 635-641, 802-808, 952-958, 1083-1089, 1250-1256, 1398-1404, 1538-1544, 1704-1710

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarify the use of repeated(Array[Filter.Config]) for the filters field.

The documentation should explicitly mention how these filters are applied during the update process, especially since this is a change from a singular to a repeated field.

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure consistency in the description of the filters field across different sections.

The description of the filters field should be consistent across all RPC methods to avoid confusion. Consider using a single, detailed description that can be referenced wherever needed.

| :---------------------: | :----------------------------- | :---- | :------: | :------------------------------------------------------------------------------------------------------------ |
| skip_strict_exist_check | bool | | | Check whether the same vector is already inserted or not.<br> The ID should be unique if the value is `true`. |
| timestamp | int64 | | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. |
| filters | repeated(Array[Filter.Config]) | | | Configuration for filter. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Review the application of filters in the MultiUpdate RPC.

It's crucial to document how the filters are applied when multiple requests are processed in a single RPC call, especially given the change to a repeated field.

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

Successfully merging this pull request may close these issues.

None yet

7 participants