-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Wildcard search in GroupedOr()
#383
Comments
I assume this is the analyzer you are using. The backoffice uses a culture invariant analzyer - see https://github.com/umbraco/Umbraco-CMS/blob/8b878a7aa6302a1ee060f4f601cd6994ca178e3f/src/Umbraco.Examine.Lucene/DependencyInjection/ConfigureIndexOptions.cs#L36 the external one uses a standard analyzer. Under the hood, the CultureInvariantWhitespaceAnalyzer is this: https://github.com/Shazwazza/Examine/blob/release/3.0/src/Examine.Lucene/Analyzers/CultureInvariantWhitespaceAnalyzer.cs Which is a whitespace analyzer + LowerCaseFilter + ASCIIFoldingFilter (removes international symbols and converts to plain ascii) You could try this for the external index: https://github.com/Shazwazza/Examine/blob/release/3.0/src/Examine.Lucene/Analyzers/CultureInvariantStandardAnalyzer.cs which is the same as above, but with standard analyzer instead of whitespace. |
That's for
I tried setting I will check with |
I'm pretty sure this is because of the analyzer. You can test by searching with the ascii folder chars instead. |
The backoffice uses the culture invariant analyzer to try to provide a reasonable all-rounder experience for anyone working in the back office. If you have a very specific language structure in your entire site and all of your editors are the same language, than you can change the default analyzer to Standard, or whatever suits your team. |
Yeah, I tried this
but didn't seem it returned the results with Danish characters. I found something like this if we want to customize/extend a specific analyzer. Not sure if it has been documented. Will investigate further :) |
That link just shows what we already have for the CultureInvariantStandardAnalyzer https://github.com/Shazwazza/Examine/blob/release/3.0/src/Examine.Lucene/Analyzers/CultureInvariantStandardAnalyzer.cs |
Yes :) Actually I have this instead:
would have assumed the search returned the same results as searching but I recall the I tried replacing the analyzer with CultureInvariantStandardAnalyzer instead, but it seems it also return zero results for term
|
I couldn't make it work by replacing the analyzer, so for now I have this workaround instead to replace the Danish letters
Then it find results like |
I noticed there's a ScandinavianFoldingFilter and ScandinavianNormalizationFilter The difference is: ScandinavianFoldingFilter ScandinavianNormalizationFilter I wonder if it makes sence to able to use a different filter than I tried making a copy of that and used |
It looks like a similar issue @jemayn had in #263 (comment) replacing |
@Shazwazza btw in the current logic without any configuration of
but it seems to be related to wilcard search as you mentioned here: |
@bjarnef Appreciate all the feedback and research here but ultimately this comes down to how analyzers are configured for the various indexes in Umbraco. My advice to get to the bottom of this is to run simple tests i.e. clone the Examine Repo and create a test case using the FluentApiTests - this is quite easy and will allow you to iterate quicker in testing to validate results/expectations. As I don't see this being an Examine bug, I will close this issue but feel free to comment on it. I'm more than happy to make tweaks to Examine where it makes sense but in this case I don't think this is Examine specific and is mostly based on how Umbraco configures the indexes. |
I may be missing something, but in a current project I have something like this to have a free text search on
bæredygtighed
(sustainability), but just the partbæredygtig
withouthed
.and the raw lucene query:
but it returns no results:
But same query in backoffice (I think this is using
NativeQuery()
does return results).Umbraco v12.3.9
Examine v3.1.0
The text was updated successfully, but these errors were encountered: