Skip to content

Commit

Permalink
Add e-mail index
Browse files Browse the repository at this point in the history
  • Loading branch information
helviojunior committed Jan 15, 2025
1 parent 2c52275 commit bab9852
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions filecrawler/cmd/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def pre_run(self, **data):
'properties': {
'indexing_date': {'type': 'date'},
'filename': {'type': 'text'},
'path_virtual': {'type': 'text'},
'path_real': {'type': 'text'},
'scheme': {'type': 'keyword'},
'host': {'type': 'keyword'},
'port': {'type': 'long'},
Expand All @@ -202,8 +204,10 @@ def pre_run(self, **data):
'properties': {
'indexing_date': {'type': 'date'},
'filename': {'type': 'text'},
'path_virtual': {'type': 'text'},
'path_real': {'type': 'text'},
'email': {'type': 'keyword'},
'host': {'type': 'keyword'}
'domain': {'type': 'keyword'}
}
}
}
Expand Down Expand Up @@ -371,7 +375,7 @@ def _text_to_emailobj(email_text):
email_text = email_text.lower().strip('"\' ()[]{}\r\n\t')
data = {
'email': email_text,
'host': '',
'domain': '',
}

try:
Expand Down

0 comments on commit bab9852

Please sign in to comment.