Examine
Examine copied to clipboard
Is there a way to include a wildcard in an Examine NativeQuery call?
I've noticed that Examine strips out the wildcard indicator when using the NativeQuery method. For example, if I pass "someProperty:test*^5" to it, it gets converted to "someProperty:test^5." Is there a way to prevent the wildcard from getting stripped out? I know of a way to work around this issue, but would prefer to avoid the rework if possible.
Below are the package versions I'm using. Umbraco: 8.17.1 Examine: 1.2.0
The query parser must be stripping it out. Would be interesting to create a unit test case for this and go from there. The FluentApiTests would be the place to create it, there's loads of examples there: https://github.com/Shazwazza/Examine/blob/dev/src/Examine.Test/Examine.Lucene/Search/FluentApiTests.cs
Do you think you would have anytime to setup a test case for this?
I can probably set up a test case sometime next week. Should be pretty straightforward based on what I see in the existing tests.
Had a similar issue where the the wildcard was being stripped from my Native Query. In my case it seemed to be because my search terms were wrapped in quotes:
storeName:"F*"
I removed those quotes and the wildcard worked.
Putting quotes in a query means that it will be treated as a Phrase query and wildcards are not supported in Phrase queries.