We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello @Shazwazza
First of all thank you! Great work on this package👍
As of v3.2.0, It seems that the FluentAPI is missing an option to apply boosting on a phrase. Or at least I can't find how.
v3.2.0
We can make a phrase with .Escape() like this:
.Escape()
externalIndex.Searcher.CreateQuery("content") .Field( "Title", "some phrase".Escape() );
And we can make a boosted term with .Boost() like this:
.Boost()
externalIndex.Searcher.CreateQuery("content") .Field( "Title", "potato".Boost(10) );
But how do I apply both? How do I make it generate the following LuceneQuery using your FluentAPI methods:
Title:"some phrase"^10
FYI, In order to check the LuceneQuery string that is generated by FluentAPI methods I'm just calling a regular .ToString() on a query. Like this:
.ToString()
var queryString = externalIndex.Searcher.CreateQuery("content") .Field("Title", "some phrase".Escape()) .ToString();
The text was updated successfully, but these errors were encountered:
Yes Examine API currently doesn't support chaining IExamineValue like .Escape().Boost(10)
A work around is to use a NativeQuery like
.NativeQuery("+phrase:"hello world"^10")
I'll look into adding this behavior but will most likely not be with chaining but the ability to pass in a boost to methods like Escape.
Sorry, something went wrong.
This is a related topic: #329 (comment)
No branches or pull requests
Hello @Shazwazza
First of all thank you!
Great work on this package👍
As of
v3.2.0
,It seems that the FluentAPI is missing an option to apply boosting on a phrase. Or at least I can't find how.
We can make a phrase with
.Escape()
like this:And we can make a boosted term with
.Boost()
like this:But how do I apply both?
How do I make it generate the following LuceneQuery using your FluentAPI methods:
FYI, In order to check the LuceneQuery string that is generated by FluentAPI methods I'm just calling a regular
.ToString()
on a query. Like this:The text was updated successfully, but these errors were encountered: