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

Revert email analyzer #32

Merged
merged 2 commits into from Feb 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions lib/estella/analysis.rb
Expand Up @@ -18,9 +18,6 @@ module Analysis
NGRAM_ANALYZER =
{ type: 'custom', tokenizer: 'standard_tokenizer', filter: %w[lowercase asciifolding front_ngram_filter] }

EMAIL_ANALYZER =
{ type: 'custom', tokenizer: 'uax_url_email', filter: %w[lowercase stop] }

DEFAULT_ANALYSIS = {
tokenizer: {
standard_tokenizer: { type: 'standard' }
Expand All @@ -33,7 +30,6 @@ module Analysis
snowball_analyzer: SNOWBALL_ANALYZER,
shingle_analyzer: SHINGLE_ANALYZER,
ngram_analyzer: NGRAM_ANALYZER,
email_analyzer: EMAIL_ANALYZER,
search_analyzer: DEFAULT_ANALYZER
}
}
Expand All @@ -42,17 +38,15 @@ module Analysis
default: { type: 'text', analyzer: 'default_analyzer' },
snowball: { type: 'text', analyzer: 'snowball_analyzer' },
shingle: { type: 'text', analyzer: 'shingle_analyzer' },
ngram: { type: 'text', analyzer: 'ngram_analyzer', search_analyzer: 'search_analyzer' },
email: { type: 'text', analyzer: 'email_analyzer' }
ngram: { type: 'text', analyzer: 'ngram_analyzer', search_analyzer: 'search_analyzer' }
}

DEFAULT_FIELD_FACTORS = {
default: 10,
ngram: 10,
snowball: 3,
shingle: 2,
search: 2,
email: 2
search: 2
}

FULLTEXT_ANALYSIS = DEFAULT_FIELDS.keys
Expand Down