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

filter string and updated tests #109

Merged
merged 5 commits into from
Aug 23, 2024
Merged

Conversation

vietnguyengit
Copy link
Contributor

No description provided.

Copy link
Contributor

@utas-raymondng utas-raymondng left a comment

Choose a reason for hiding this comment

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

Instead of change in code, is it easier to do it in elastic ?
``
"index": {
"analysis": {
"filter": {
"remove_uuids": {
"type": "pattern_replace",
"pattern": "[a-fA-F0-9]{32}", // Regular expression to match UUIDs
"replacement": ""
},
"my_shingle_filter": {
"type": "shingle",
"min_shingle_size": 2,
"max_shingle_size": 3,
"output_unigrams": true
}
},
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": ["lowercase", "remove_uuids", "my_shingle_filter"]
}
}
}

@utas-raymondng
Copy link
Contributor

utas-raymondng commented Aug 23, 2024

Also pure number can be remove ?

        "remove_numbers": {
          "type": "pattern_replace",
          "pattern": "\\b\\d+\\b",
          "replacement": ""
        },

@utas-raymondng
Copy link
Contributor

And single char like "m"

@vietnguyengit
Copy link
Contributor Author

Instead of change in code, is it easier to do it in elastic ? `` "index": { "analysis": { "filter": { "remove_uuids": { "type": "pattern_replace", "pattern": "[a-fA-F0-9]{32}", // Regular expression to match UUIDs "replacement": "" }, "my_shingle_filter": { "type": "shingle", "min_shingle_size": 2, "max_shingle_size": 3, "output_unigrams": true } }, "analyzer": { "my_analyzer": { "type": "custom", "tokenizer": "standard", "filter": ["lowercase", "remove_uuids", "my_shingle_filter"] } } }

didn't think about that path, I'll try

Copy link
Contributor

@utas-raymondng utas-raymondng left a comment

Choose a reason for hiding this comment

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

LGTM, please reload after deployed to edge thanks

@utas-raymondng utas-raymondng merged commit 6a1a656 into main Aug 23, 2024
2 checks passed
@vietnguyengit vietnguyengit deleted the 5800-clean-unwanted-phrases branch August 23, 2024 06:01
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

Successfully merging this pull request may close these issues.

2 participants