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

Request to add token for keyword field type #5240

Closed
andreadelrio opened this issue Oct 4, 2021 · 6 comments · Fixed by #5251
Closed

Request to add token for keyword field type #5240

andreadelrio opened this issue Oct 4, 2021 · 6 comments · Fixed by #5251
Labels

Comments

@andreadelrio
Copy link
Contributor

andreadelrio commented Oct 4, 2021

Hi team, we're in need of a token for the keyword field type to be used in Discover (and Data Visualizer). Our aim is to use two different tokens for the text type and the keyword type (currently we use tokenString for both which could lead to confusion).

There already exists a token called tokenKeyword but as far as I can tell it is meant for a different definition of keyword.
Now what is the keyword type? I find this definition useful:

The primary difference between the text datatype and the keyword datatype is that text fields are analyzed at the time of indexing, and keyword fields are not. What that means is, text fields are broken down into their individual terms at indexing to allow for partial matching, while keyword fields are indexed as is. For example, a text field containing the value “Roosters crow everyday” would get all of its individual components indexed: “Roosters”, “crow”, and “everyday”; a query on any of those terms would return this string. However, if the same string was stored as a keyword type, it would not get broken down. Only a search for the exact string “Roosters crow everyday” would return it as a result.

I'm hoping to collect some ideas here for what that new token could look like so that we can look into creating it. Some ideas that we've had are a) a "k" letter and b) using quotes.

@andreadelrio
Copy link
Contributor Author

@timroes @qn895 please let me know what you think about these two alternatives and if you have any other ideas you'd like me to explore

Frame 21

Frame 20

@timroes
Copy link
Contributor

timroes commented Oct 6, 2021

While I am always in favor of a much saying icon, I have the feeling we might simply not find an icon that is self-explanatory by itself, so I am currently actually tending more towards simply using the letter k for the keyword fields and keep t for text fields. cc @kertal @majagrubic any thoughts from you?

@elizabetdev
Copy link
Contributor

@andreadelrio I also think the letter k works better. 👍🏽

@kertal
Copy link
Member

kertal commented Oct 6, 2021

ok!

@andreadelrio
Copy link
Contributor Author

Thank you all for your input. I've opened a PR adding this icon here #5251.

@timroes @kertal Does using the same color pattern as the token for text sound good? We have a number of color combinations we can use if we prefer that. One reason to keep text and keyword aligned would be to have text-based fields in the same colors. However, if we want to make the difference easier to spot we could pick another color set for this new icon. You can check color options here.

@timroes
Copy link
Contributor

timroes commented Oct 7, 2021

I all in favor of keeping the same color!

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

Successfully merging a pull request may close this issue.

4 participants