bichon icon indicating copy to clipboard operation
bichon copied to clipboard

[FEATURE] Wildcard search in subject

Open qvc57gtcdy-hue opened this issue 10 months ago • 11 comments

It would be a great enhancement, when searching with wildchars like "xyz*" or maybe as regex "xyz.*" would be possible. Currently you must exact know what and in which form a word is written. I think, there a less people who remember exactly what was written F.e. was it "license nr" or "licensenumber" or "licensenr". AFAIK the Tantivy store is able to search for regex/wildchars.

qvc57gtcdy-hue avatar Jan 26 '26 18:01 qvc57gtcdy-hue

Unfortunately, this doesn’t seem to be possible, as Tantivy applies regex and wildcard matching only to tokenized terms rather than the full original text.

rustmailer avatar Jan 27 '26 03:01 rustmailer

Isn't it possible to include the subject header like sender and receiver in the tokenizing process? Unfortunately I'm not a rust programmer, so I can't look at the source. Tokenizing the whole email would be overwhelming, I know.

qvc57gtcdy-hue avatar Feb 02 '26 21:02 qvc57gtcdy-hue

@qvc57gtcdy-hue The subject header is already part of the tokenization process. Regex matching happens at the term level, not on the raw subject text, so there is no subject-specific regex.

For example, if the subject is:

Re: Invoice for January

it will be tokenized into terms like:

re, invoice, for, january

When you use a regex, it is applied to each token (term), not to the raw subject string itself.

rustmailer avatar Feb 02 '26 22:02 rustmailer

If I understand this right, then searching for Jan.* (or Jan*) should find the above mentioned example subject line? But this unfortunately doesn’t work. I tried to find a email with a order number I only remember partially but the mail is only found by the complete number, not with a wildchar search.

qvc57gtcdy-hue avatar Feb 03 '26 23:02 qvc57gtcdy-hue

@qvc57gtcdy-hue The current search does indeed have some issues. I may focus on doing a dedicated round of optimizations in the near future.

rustmailer avatar Feb 04 '26 06:02 rustmailer

Thank you so much for the work on this great software. When I can support the development in any way, please let me know. I think, I‘m a good tester and specialized in data security and the german DSGVO and the digital financial rules therefore.

qvc57gtcdy-hue avatar Feb 04 '26 10:02 qvc57gtcdy-hue

@qvc57gtcdy-hue Thank you very much for your appreciation and support. I noticed that you’ve already donated to the project — many thanks for that.

You’re very welcome to join the Discord channel and leave messages at any time; I check it almost every day. Bichon can definitely be improved a lot, and there is still plenty of room for growth. Advice from professionals like you is truly valuable.

Of course, I also hope more people will get to know Bichon. It is completely user-driven: the more people use it, the more feedback, suggestions, and PR contributions we’ll receive.

rustmailer avatar Feb 04 '26 12:02 rustmailer

I am also interested in this. I've successfully imported 97,000 emails in to Bichon, I only set it up a few hourse ago :) . Please don't take my comments as a negative, just some feedback.

My current concern is "Will I be able to find the email" when the time comes. I was doing a similar test to @qvc57gtcdy-hue and was trying to find an email and searched for clockwork and nothing returned. I had to search clockworkpi before the emails returned. In this case not a huge deal but you never know the exact format of the email text. If I search for clockwork pi nothing comes back, as expected but I don't know what the format will be.

Appreciate there maybe some techical limitations of some components that may make things harder but in my opinion, search needs to one of the most flexible parts of an email archive as there is no point having the archive if you can't find what you need.

The project is fantastic so far and really exclited to have found it. Thanks for all your effort so far! Keen to see how it develops.

preArcMed821 avatar Feb 05 '26 15:02 preArcMed821

@preArcMed821 Welcomes any feedback and suggestions—please don’t feel any pressure at all, feel free to leave comments anytime. The search functionality will be optimized.

rustmailer avatar Feb 05 '26 16:02 rustmailer

This is an interesting topic.

How does Bichon currently handle CJK language tokenization?

For example if I have an email like this:

Title: 新年快乐

Content: 祝你们新年快乐

Can I search for "新年" and find a match?

I feel there might be be an argument made for tokenizing each sentence using comma, period, question mark etc. and new line as separator.

And there are different comma, question mark, period as well, like ? 。 ,

christaikobo avatar Feb 06 '26 02:02 christaikobo

@christaikobo At the moment, there is no dedicated tokenizer for Chinese, Japanese, or Korean, which can cause search results to be missing. More flexible tokenizers will be configured in the future.

rustmailer avatar Feb 07 '26 15:02 rustmailer