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

[Enhancement] Add Open Parameters to Flat_object Field Type #7137

Open
mingshl opened this issue Apr 13, 2023 · 11 comments · May be fixed by #13853
Open

[Enhancement] Add Open Parameters to Flat_object Field Type #7137

mingshl opened this issue Apr 13, 2023 · 11 comments · May be fixed by #13853
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request help wanted Extra attention is needed Search Search query, autocomplete ...etc

Comments

@mingshl
Copy link
Contributor

mingshl commented Apr 13, 2023

Is your feature request related to a problem? Please describe.
Flat objects currently do not support open parameters. Looking forward to add open parameter to increase better search results.

Describe the solution you'd like
The following open parameters setting are useful to consider to add in, including normalizer, docValues, ignoreAbove, nullValue, similarity, and depthlimit.

normalizer: allow lowercase, uppercase
docValues: allow to set docValues to be false
ignoreAbove: allow to set if the length of a field is go above certain limit then ignore the document.
nullValue: allow to set nullValue to others
similarity: allow to set similarity setting
depthlimit: allow to set maximum depth limitation to the JSON document

Additional context
Add any other context or screenshots about the feature request here.

@mingshl mingshl added enhancement Enhancement or improvement to existing feature or request untriaged labels Apr 13, 2023
This was referenced Apr 13, 2023
@mingshl mingshl added the Search Search query, autocomplete ...etc label Apr 17, 2023
@macohen macohen removed the untriaged label Apr 17, 2023
@macohen macohen moved this from 🆕 New to Next (Next Quarter) in Search Project Board Apr 17, 2023
@mingshl
Copy link
Contributor Author

mingshl commented Apr 17, 2023

Hi @lukas-vlcek, are you planning to take up this issue?

@mingshl mingshl added the help wanted Extra attention is needed label May 2, 2023
@lukas-vlcek
Copy link
Contributor

Sure, I can take this one. Thank you!

And I am happy to take a look at the other tickets later too if they will be still available (#7136, #7138).

@mingshl
Copy link
Contributor Author

mingshl commented May 3, 2023

I will take up #7136, but #7138 is also help wanted.

@mingshl
Copy link
Contributor Author

mingshl commented May 12, 2023

@lukas-vlcek If you decide to work on this issue, would you like to assign yourself in this issue?

@lukas-vlcek
Copy link
Contributor

@mingshl I can not assign myself (have no privs to do that). Can you please assign me?

@mingshl
Copy link
Contributor Author

mingshl commented May 15, 2023

@mingshl I can not assign myself (have no privs to do that). Can you please assign me?

of course. done

@mingshl mingshl added v2.11.0 Issues and PRs related to version 2.11.0 and removed v2.11.0 Issues and PRs related to version 2.11.0 labels Aug 23, 2023
@ryn9
Copy link

ryn9 commented Jan 22, 2024

@mingshl @lukas-vlcek

Can we please get (and maybe prioritize :) ) the addition of the "ignore_malformed" option for flat_object?

Reference:
https://opensearch.org/docs/latest/field-types/

When set to true , and a document is received that is not valid json, the document will not be rejected, rather the field would ignored.
IE - the field would not be indexed, and added the the "_ignored" array

This would help in situation like that referenced in the following issue, where we cannot 100% control if a valid json object is being provided.
#8250
While this would not make the field searchable , when the option is set, at least the document would not be rejected.

@kkewwei
Copy link
Contributor

kkewwei commented May 27, 2024

@lukas-vlcek If you haven't started doing it yet, I'd love to try it.

@lukas-vlcek
Copy link
Contributor

lukas-vlcek commented May 27, 2024

@kkewwei Feel free to jump on it.
I currently do not have any spare capacity to work on it.

@msfroh
Copy link
Collaborator

msfroh commented May 31, 2024

@kkewwei -- Thanks a lot for picking this one up!

Once your fix is in (or maybe there's some overlap?) you might want to take a look at #11635.

For that one, I think we can clean up some (most?) of the query logic from FlatObjectFieldType -- a lot of it (I think) would become "If this query is qualified with a path, then delegate to valueAndPathFieldType, else delegate to valueFieldType".

@kkewwei
Copy link
Contributor

kkewwei commented Jun 3, 2024

@msfroh get it, it's a good idea, It can simply the code, I will try to implement it with you suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request help wanted Extra attention is needed Search Search query, autocomplete ...etc
Projects
Status: Next (Next Quarter)
Development

Successfully merging a pull request may close this issue.

6 participants