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

Filter user folders and drafts and templates #423

Closed
blankdots opened this issue Aug 13, 2021 · 4 comments · Fixed by #685
Closed

Filter user folders and drafts and templates #423

blankdots opened this issue Aug 13, 2021 · 4 comments · Fixed by #685
Assignees
Labels
backend backend issue enhancement New feature or request

Comments

@blankdots
Copy link
Contributor

Description

As a user that has many folders, drafts and template i would need to filter them so i can find what i am looking for.

Add to folders, drafts and templates search by name and date created

image

dateCreated key already exists in folder but maybe this might need some additional help from back-end to do the search.

DoD (Definition of Done)

user is able to filter by name and by date created

Testing

unit and integration testing

@blankdots blankdots added the enhancement New feature or request label Aug 13, 2021
@blankdots blankdots self-assigned this Aug 30, 2021
@blankdots blankdots added the backend backend issue label Aug 30, 2021
@blankdots
Copy link
Contributor Author

i will take care of this in the backend

@genie9
Copy link
Contributor

genie9 commented Dec 7, 2021

@blankdots Some questions have arisen during the implementation of folder filtering by name:

  1. Should there be an additional field for searching text_name separating folder name by delimiters?
    • discussed in RC => yes
  2. Is it good enough to search by full string matching with text search (indexed)?
    or
  3. Should we implement regex with ^-prefix- so we could use partial and also indexed search?
    • discussed in RC => 2 is chosen
  4. Would name filtering be using only one word, not an array of words?
  5. Should description-field be included in the search (indexed)? How long are descriptions usually and would it mess filtering by name? (Asking because Stefan's example included description-field in indexing)
  6. Should the new field text_name be shown in the query results?

@blankdots
Copy link
Contributor Author

blankdots commented Dec 7, 2021

@genie9 i assume we are talking about this backend issue CSCfi/metadata-submitter/issues/280

@blankdots Some questions have arisen during the implementation of folder filtering by name:

1. Should there be an additional field for searching `text_name` separating folder name by delimiters?
   
   * discussed in RC => yes

true, but that is an implementation detail.

2. Is it good enough to search by full string matching with text search (indexed)?

yes, text search should be it to take advantage of indexing, we will not do regex. Simple (text) search, we will do, no need to do anything fancy like elastic search does.

3. Should we implement regex with ^-prefix-  so we could use partial and also indexed search?
   
   * discussed in RC => 2 is chosen

No regex please, it is not required for this use case.

4. Would name filtering be using only one word, not an array of words?

based on this, if there are multiple words https://docs.mongodb.com/manual/text-search/#-text-operator will create an OR so we can get as many words as needed

5. Should `description`-field be included in the search (indexed)? How long are descriptions usually and would it mess filtering by name? (Asking because Stefan's example included `description`-field in indexing)

This I am not 100% sure, but I would leave out, as descriptions can often take the form of an abstract. If we get request to do it then we will add it with another issue.

6. Should the new field `text_name` be shown in the query results?

No. that is internal

@genie9
Copy link
Contributor

genie9 commented Dec 7, 2021

i assume we are talking about this backend issue CSCfi/metadata-submitter/issues/280

Sorry, was in the wrong repository, I copy these questions to backend

@blankdots blankdots removed their assignment Dec 20, 2021
@hannyle hannyle self-assigned this Jan 3, 2022
@blankdots blankdots added this to the 0.12.0 milestone Feb 28, 2022
@hannyle hannyle linked a pull request Mar 2, 2022 that will close this issue
2 tasks
@hannyle hannyle closed this as completed Mar 10, 2022
@genie9 genie9 modified the milestones: 0.12.0, Sprint 29/04 Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend backend issue enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants