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

Rename .raw to .original fields #107

Merged
merged 2 commits into from
Aug 30, 2018
Merged

Conversation

ruflin
Copy link
Contributor

@ruflin ruflin commented Aug 29, 2018

  • Rename user_agent.raw to user_agent.original and make it a keyword. I think this always should have been a keyword.
  • Rename event.raw to event.original.

Closes #102

@ruflin ruflin added the review label Aug 29, 2018
@ruflin ruflin requested a review from webmat August 29, 2018 07:36
Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

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

Good stuff overall, but I have a request about the indexing for user_agent.original.

- name: raw
type: text
- name: original
type: keyword
Copy link
Contributor

Choose a reason for hiding this comment

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

I would actually make this one multi-field.

Full text search will be useful for weird user agents that aren't recognized by the US parsers (various language HTTP libs, obscure crawlers, etc). Still useful to filter for everything that contains "Python", for example. So for this we need to retain full text search.

So I would go with FTS at the top + .keyword for the nested field.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or you can consider this out of scope for now, and wait for the full review of fields in #104 to go MF. In that case we should leave it at text indexing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I consider it out of scope for now :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. So you'll revert back to text indexing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can do. So far I was thinking it's a bug that it's text :-)

@@ -21,7 +21,7 @@ ECS fields used in Filebeat for the apache module.
| <a name="http.response.body_sent.bytes"></a>*http.response.body_sent.bytes* | *Http response body bytes sent, currently apache.access.body_sent.bytes* | long | | `117` |
| <a name="http.referer"></a>*http.referer* | *Http referrer code, currently apache.access.referrer<br/>NOTE: In the RFC its misspell as referer and has become accepted standard* | keyword | | `http://elastic.co/` |
| <a name="user_agent.&ast;"></a>*user_agent.&ast;* | *User agent fields as in schema. Currently under apache.access.user_agent.*<br/>* | | | |
| [user_agent.raw](https://github.com/elastic/ecs#user_agent.raw) | Raw user agent. Currently apache.access.agent | text | | `http://elastic.co/` |
| <a name="user_agent.raw"></a>*user_agent.raw* | *Raw user agent. Currently apache.access.agent* | text | | `http://elastic.co/` |
Copy link
Contributor

Choose a reason for hiding this comment

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

Ha, good catch. You've looked for event.raw in the examples as well, I assume?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean the use cases? Hm, I didn't :-(

ruflin added 2 commits August 30, 2018 09:14
* Rename `user_agent.raw` to `user_agent.original` and make it a keyword. I think this always should have been a keyword.
* Rename `event.raw` to `event.original`.

Closes elastic#102
@ruflin
Copy link
Contributor Author

ruflin commented Aug 30, 2018

@webmat New version pushed and use cases updated.

Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

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 this pull request may close these issues.

2 participants