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

Feedback Dataset search endpoint #3067

Closed
gabrielmbmb opened this issue Jun 2, 2023 · 0 comments · Fixed by #3068
Closed

Feedback Dataset search endpoint #3067

gabrielmbmb opened this issue Jun 2, 2023 · 0 comments · Fixed by #3068
Assignees
Labels
type: enhancement Indicates new feature requests

Comments

@gabrielmbmb
Copy link
Member

gabrielmbmb commented Jun 2, 2023

Create a new search endpoint POST /api/v1/me/datasets/{dataset_id}/records/search allowing to search records using the search function introduced in #3037.

Input

The input payload of the endpoint will be for searching in all the fields of the dataset:

{
  "query": {
    "text": { "q": "bad" }
  }
}

Input payload for searching in a specific field:

{
  "query": {
    "text": { "q": "bad", "field": "text" }
  }
}

Additionally, the following query parameters could be provided:

  • include: to specify which additional information has to be included in the output (like the responses)
  • response_status: to filter the results based on the response status

Output

{
  "items": [
    {
      "record": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "fields": {},
        "external_id": "string",
        "responses": [
          {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "values": {
              "question-1": {
                "value": "string"
              },
              "question-2": {
                "value": "string"
              },
              "question-3": {
                "value": "string"
              }
            },
            "status": "draft",
            "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "inserted_at": "2023-06-02T14:42:30.335Z",
            "updated_at": "2023-06-02T14:42:30.335Z"
          }
        ],
        "inserted_at": "2023-06-02T14:42:30.335Z",
        "updated_at": "2023-06-02T14:42:30.335Z"
      },
      "query_score": 14.234
    }
  ]
}
@gabrielmbmb gabrielmbmb added the type: enhancement Indicates new feature requests label Jun 2, 2023
@gabrielmbmb gabrielmbmb added this to the v1.9.0 milestone Jun 2, 2023
@gabrielmbmb gabrielmbmb self-assigned this Jun 2, 2023
@gabrielmbmb gabrielmbmb removed this from the v1.9.0 milestone Jun 2, 2023
frascuchon added a commit that referenced this issue Jun 5, 2023
# Description

This PR introduces a new endpoint `POST
/api/v1/me/datasets/{dataset_id}/records/search` that will allow the
user to search records using some basic queries over the fields.

Closes #3067

**Type of change**

- [x] New feature (non-breaking change which adds functionality)

**How Has This Been Tested**

New unit tests have been added to test the functionality of this new
endpoint. In addition, I manually tested the endpoint using the Argilla
dolly dataset.

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Francisco Aranda <francis@argilla.io>
davidberenstein1957 pushed a commit that referenced this issue Jun 5, 2023
# Description

This PR introduces a new endpoint `POST
/api/v1/me/datasets/{dataset_id}/records/search` that will allow the
user to search records using some basic queries over the fields.

Closes #3067

**Type of change**

- [x] New feature (non-breaking change which adds functionality)

**How Has This Been Tested**

New unit tests have been added to test the functionality of this new
endpoint. In addition, I manually tested the endpoint using the Argilla
dolly dataset.

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Francisco Aranda <francis@argilla.io>
davidberenstein1957 pushed a commit that referenced this issue Jun 7, 2023
# Description

This PR introduces a new endpoint `POST
/api/v1/me/datasets/{dataset_id}/records/search` that will allow the
user to search records using some basic queries over the fields.

Closes #3067

**Type of change**

- [x] New feature (non-breaking change which adds functionality)

**How Has This Been Tested**

New unit tests have been added to test the functionality of this new
endpoint. In addition, I manually tested the endpoint using the Argilla
dolly dataset.

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Francisco Aranda <francis@argilla.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant