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

Strip out spaces from robots field #2

Open
mrdavidlaing opened this issue Jun 19, 2014 · 1 comment
Open

Strip out spaces from robots field #2

mrdavidlaing opened this issue Jun 19, 2014 · 1 comment
Milestone

Comments

@mrdavidlaing
Copy link
Member

"robots", stores the sent Robots-X-Tag HTTP headers. Is there a way to simply remove the spaces from these? Right now it shows noindex, follow and noindex,follow as different entities.
See screenshot: http://uploads.yoast.nl/Kibana_3_-_Googlebot_19471DBC.png

@mrdavidlaing mrdavidlaing added this to the Milestone 1 milestone Jun 19, 2014
@dpb587
Copy link

dpb587 commented Jun 20, 2014

Maybe something like this...

mutate {
  gsub => [ "robots", "\s+", "" ]
  split => [ "robots", "," ]
}

Which would result in something like (an array may be more beneficial than a primitive string, although indexing-wise they can be fairly similar)...

{
  "robots": [
    "noindex",
    "follow"
  ]
}

If a string is preferred (may have further issues on noindex, follow vs follow, noindex), should probably do something like this which will ensure there's always a space...

mutate {
  gsub => [ "robots", ",\s*", ", " ]
}

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

No branches or pull requests

2 participants