November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Okay, maybe it was the problem after all. It works if I set the current thread to Invariant.Cutlture ( Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("iv")); before building my query. Is this the way to go, or does anyone have a better solution? Right now it seems like a hackish solution.
I'm trying to boost a query on certain fields but the value of the score property of my IndexresponseItems is set zero.
I found this post by Anders Hattestad, but unfortunatley that didn't seem to be the problem in my case.
Here's what my query looks like:
var query = new GroupQuery(LuceneOperator.AND);
if (!string.IsNullOrWhiteSpace(searchQuery.SearchText))
{
var searchTextQuery = new GroupQuery(LuceneOperator.OR);
searchTextQuery.QueryExpressions.Add(new TermBoostQuery(searchQuery.SearchText, Field.Title, 1F));
searchTextQuery.QueryExpressions.Add(new TermBoostQuery(searchQuery.SearchText, Field.Modified, 0.8F));
searchTextQuery.QueryExpressions.Add(new TermBoostQuery(searchQuery.SearchText, Field.DisplayText, 0.5F));
searchTextQuery.QueryExpressions.Add(new FieldQuery(searchQuery.SearchText, Field.Title));
query.QueryExpressions.Add(searchTextQuery);
}
return query;