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

Add /_cat/fielddata to display fielddata usage #6086

Merged
merged 1 commit into from May 9, 2014

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented May 7, 2014

Currently has a disabled REST test, I'm not yet sure why the regular expression doesn't match.

The output is a little different because it has a dynamic number of columns depending on the number of fields, so if anyone has an alternative output format suggestion that would be great.

Closes #4593

@kimchy
Copy link
Member

kimchy commented May 7, 2014

the code looks good, yea, this is the first time we have dynamic headers, but I think it makes sense in this context, maybe @clintongormley can chip in on the test / the fact that the headers are dynamic.


- match:
$body: |
/^total [\n0b ]+8\.4kb[\n0b ]+$/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main issue are whitespaces, we use the Pattern.COMMENTS flag to make regexes more readable, which means that you have to be explicit with whitespaces and use \s as the ' ' are ignored.
I got the following regex to work, changed the indendation too:

               /^   total   \s \n
                   (\s+0b   \s \n)*
                    8\.4kb  \s \n
                   (\s+0b   \s \n)*  $/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks for the explanation, I committed a change to use your regex.

@javanna
Copy link
Member

javanna commented May 8, 2014

LGTM

@dakrone dakrone merged commit e7e4ef8 into elastic:master May 9, 2014
@jpountz jpountz removed the review label May 12, 2014
@dakrone dakrone deleted the 4593-add-cat-fielddata branch September 9, 2014 13:48
@clintongormley clintongormley added the :Data Management/CAT APIs Text APIs behind /_cat label Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add /_cat/fielddata to display fielddata on a per-node per-field basis
7 participants