You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run this code it results in a query something like this: +Language:fr +ContractType:"Intérimaire option contrat fixe"
However, running this query using Examine gives me this:
Whereas there's definitely results in the index that should match this query, which can be demonstrated by running the stringified query in the interface:
or even feeding it to the NativeQuery method:
I'm using Escape since (as seen in the screenshots) some parameters are multiple words but should be treated as a single term (otherwise irrelevant results are shown as well.
The field is indexed as FieldDefinitionTypes.FullText and has new StandardAnalyzer(LuceneVersion.LUCENE_48) as it's analyzer.
Currently my workaround is to take the string version and feed it to the parser again, but that feels like a hacky workaround I'd very much like to get rid of.
The text was updated successfully, but these errors were encountered:
Having hit the issue myself and trying to create a failing test, NativeQuery doesn't leave your string input alone as you might think.
If you take a look at the raw query that NativeQuery generates I think you'll find that it's lowercased.. whereas Escape() will leave it upper case.
(lower casing being key for the phrase to match against the index??)
I noticed when writing out the generated queries to the test console.. #329 (comment)
I'm dynamically building a query from parameters using the following function:
When I run this code it results in a query something like this:
+Language:fr +ContractType:"Intérimaire option contrat fixe"
However, running this query using Examine gives me this:
Whereas there's definitely results in the index that should match this query, which can be demonstrated by running the stringified query in the interface:
or even feeding it to the
NativeQuery
method:I'm using
Escape
since (as seen in the screenshots) some parameters are multiple words but should be treated as a single term (otherwise irrelevant results are shown as well.The field is indexed as
FieldDefinitionTypes.FullText
and hasnew StandardAnalyzer(LuceneVersion.LUCENE_48)
as it's analyzer.Currently my workaround is to take the string version and feed it to the parser again, but that feels like a hacky workaround I'd very much like to get rid of.
The text was updated successfully, but these errors were encountered: