CloudantV1.postPartitionSearch does not return order field in Node.JS
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- nodejs, typescript
Hướng nghiên cứu
Bắt đầu tại điểm vào CloudantV1.postPartitionSearch và kiểm tra cách phản hồi tìm kiếm của nó được biểu diễn trong Node.js SDK. So sánh các hàng được trả về với các phản hồi được ghi lại và phản hồi của Python, tập trung vào trường order bị thiếu. Công việc được hoàn tất khi mỗi kết quả bao gồm mảng order như mong đợi mà không làm hỏng các trường phản hồi khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
CloudantV1.postPartitionSearch method should return an order field with each result, containing the relevance score. This works when using the Python library, however, it does not work in Node.JS using @ibm-cloud/cloudant package.
To Reproduce
In Node.JS, create an API that uses CloudantV1.postPartitionSearch. The result is missing the order field. Example response in Node.JS:
{"totalRows":4,"bookmark":"g2wAAAA...","rows":[{"fields":{"FormNumber":"SG24-8573-00"},"id":"rb:SG24-8573-00"}...
Using the same database, same partition, same method and same query, an equivalent Python script correctly returns the order field for each result.
Example response in Python:
{'total_rows': 4, 'bookmark': 'g2wAAAA...', 'rows': [{'id': 'rb:SG24-8573-00', 'order': [0.910089373588562, 2766], 'fields': {'FormNumber': 'SG24-8573-00'}...
Expected behavior
As per Cloudant documentation:
The response to a search query includes an order field for each of the results. The order field is an array where the first element is the field or fields that are specified in the sort parameter.
Screenshots
Must gather (please complete the following information):
- SDK version 0.12.7
- Node.js Version 20
- Name of service that you're trying to use: @ibm-cloud/cloudant in Node.JS
- method CloudantV1.postPartitionSearch
Additional context
No workaround found using the Node.JS library. The order field is simply missing from the response.
- Ngôn ngữ chính
- TypeScript
- Star
- 29
- Fork
- 16
- Merge trung bình
- 17 giờ 38 phút
- Pull request đã merge (30 ngày)
- 38
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của IBM/cloudant-node-sdk
-
Release a v1.0.0Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
IBM/cloudant-node-sdk#2099 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của IBM/cloudant-node-sdk
Issue tương tự
-
category::task code priority::normal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
e0ipso/strikethroo#145 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
cocos/cocos-docs#3333 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
RevenueCat/react-native-purchases#2079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RevenueCat/purchases-hybrid-common#2039 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-reported area/react bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày