You can increase the field in index time or during a search. To increase the field in index time, you can set:
Field titleField = new Field("title", strTitle, Field.Store.NO, Field.Index.ANALYZED); titleField.Boost = 2; doc.Add(titleField);
remember that OmitNorms must be set to false.
To enlarge the field during the search, you can set:
TermQuery q = new TermQuery(new Term("title", "cat")); q.Boost = 2; _searcher.Search(q, 100);
source share