At index time, I reinforce a specific document as follows:
if (myCondition) { document.SetBoost(1.2f); }
But during the search, documents with all the exact same qualities, but with some passing and with some lack of myCondition, all have the same score.
And here is the search code:
BooleanQuery booleanQuery = new BooleanQuery(); booleanQuery.Add(new TermQuery(new Term(FieldNames.HAS_PHOTO, "y")), BooleanClause.Occur.MUST); booleanQuery.Add(new TermQuery(new Term(FieldNames.AUTHOR_TYPE, AuthorTypes.BLOGGER)), BooleanClause.Occur.MUST_NOT); indexSearcher.Search(booleanQuery, 10);
Can you tell me what I need to do to get documents that have been increased in order to get a higher score?
Many thanks!
source share