regex search. #778
Replies: 1 comment 3 replies
-
Hi @kehiy , thanks for your feedback. While adding regex search is theoretically possible, it would significantly impact performance due to how the engine is designed. Currently, Meilisearch matches words by prefix and allows up to 2 typos per word. This ensures that we don't have to iterate over every word in the database, saving a lot of processing time. The data structure we use is a prefix-based tree, where searches are confined to relevant branches. For example, a search for "wha" will only explore branches starting with "wh." Regex, on the other hand, has more complex matching rules and doesn’t rely on prefixes. This would require Meilisearch to search across the entire database, drastically increasing the search scope. Additionally, since regex can match sequences of words, we would need to inspect every document to filter out false positives, further slowing down the process. That said, we’re always interested in learning more about our users' specific use cases! It would be helpful if you could share more details about the type of data you're searching and how regex support would improve your workflow. That way we can take them into consideration when thinking of future improvements. |
Beta Was this translation helpful? Give feedback.
-
I think this project can also support searching using a regex, which is helpful sometimes.
Beta Was this translation helpful? Give feedback.
All reactions