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
Cannot find subwords in body after 1.0.1 #32
Comments
Thank you for notice, I will dig into that and let you know |
Please kindly test with latest git |
Thank you a lot for your quick and (probably) helpful response. I’ll see that I make some time for testing this again tomorrow or latest by mid of next week. I’ll report back whether your changes fixed the issue. Thanks a bunch & Best Regards, |
Hi, I found some time to test it again, and I’m happy to report back that searching now works as expected, and I’m able to find subwords and whole phrases in all Thank you a lot! |
1320: Add xapian full-text-search plugin to dovecot r=mergify[bot] a=Nebukadneza ## What type of PR? Enhancement ## What does this PR do? Currently we are not able to offer our users a FTS experience after the demise of lucene due to unfixed coredumps with musl/alpine. We now add lucene, the only remaining maintained small/lean FTS plugin for dovecot. It is quite simple to add to our stack: A two-stage docker build is used to compile the fts plugin in the first stage, and copy over only the resulting plugin-artifact to the second stage, which is our usual dovecot container. Configuration is also minimal. There was a upstream issue where bodies were not able to be searched for subwords, but fortunately it was fixed quite quickly. We currently need to wait for a new release to use a stable tag in our `Dockerfile`. ### Related issue(s) - #1176 - #1297 - #751 - **Upstream-issues which is the cause for the `TODO` in the `Dockerfile`**: grosjo/fts-xapian#32 ## Prerequistes - [ ] Wait for upstream to prepare new release after grosjo/fts-xapian#32 — so that we can use a stable tag in our `Dockerfile` - [ ] In case of feature or enhancement: documentation updated accordingly - [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. Co-authored-by: Dario Ernst <dario@kanojo.de>
1320: Add xapian full-text-search plugin to dovecot r=mergify[bot] a=Nebukadneza ## What type of PR? Enhancement ## What does this PR do? Currently we are not able to offer our users a FTS experience after the demise of lucene due to unfixed coredumps with musl/alpine. We now add lucene, the only remaining maintained small/lean FTS plugin for dovecot. It is quite simple to add to our stack: A two-stage docker build is used to compile the fts plugin in the first stage, and copy over only the resulting plugin-artifact to the second stage, which is our usual dovecot container. Configuration is also minimal. There was a upstream issue where bodies were not able to be searched for subwords, but fortunately it was fixed quite quickly. We currently need to wait for a new release to use a stable tag in our `Dockerfile`. ### Related issue(s) - #1176 - #1297 - #751 - **Upstream-issues which is the cause for the `TODO` in the `Dockerfile`**: grosjo/fts-xapian#32 ## Prerequistes - [ ] Wait for upstream to prepare new release after grosjo/fts-xapian#32 — so that we can use a stable tag in our `Dockerfile` - [ ] In case of feature or enhancement: documentation updated accordingly - [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. Co-authored-by: Dario Ernst <dario@kanojo.de> Co-authored-by: Dario Ernst <dario.ernst@rommelag.com>
I’ve been trying to integrate fts-xapian in
Mailu
, a easy-to-use mailserver project. During testing, I made the observation that subwords are matched inSubject
orTo
, but not in the body. In the body, only full words matches are returned.I have built fts-xapian 1.2.6 in our dovecot docker, and adapted the config as shown in README.md. We use alpine 3.10 (so musl, not libc) with dovecot 2.3.7.2, xapian-core 1.4.11 and icu 64.2. The rest of the setup and config can be found here, if of any interest:
https://github.com/Nebukadneza/Mailu/blob/try_fts_xapian/core/dovecot/Dockerfile
https://github.com/Nebukadneza/Mailu/tree/try_fts_xapian/core/dovecot/conf
I’m testing using this simple python 3.7 snippet:
The test-setup includes 4 mails in the inbox:
The expected outcome is:
i.search(None, 'BODY "word"')
— should return 2, returns 0i.search(None, 'BODY "subword"')
— should return 2, returns 2i.search(None, 'TEXT "word"')
— should return 3, returns 2 (only the subject ones)i.search(None, 'SUBJECT "word"')
— should return 2, returns 2Logs on: 7b7e7e7:
Log on 1.2.6:
Log on 1.0.1:
I then went on looking at the version history, and tried the tag
fts-xapian-1.0.1
, and the above did start searching subwords in body! Upon usinggit bisect
, i found the offending commit to be 7b7e7e7 — before this commit I’m able to perform subword searches in body, afterwards it doesn’t work anymore.Unfortunately that commit’s a bit convoluted, so it’s hard for me as an outsider to follow what really happened. Maybe someone can shed a bit of light on this? Or maybe I’m doing my testing or configuration wrong …
Thanks for this great little plugin nevertheless ^_^
The text was updated successfully, but these errors were encountered: