Lucene.NET - Document boosting

454 views Asked by At

I am programming my first .NET Project including Lucene for an article search. Everything works fine for me but I got a problem in boosting special documents. I receive my articlelist to index from a database where every article has a special column for priority with values from 0 to 8.

First I tried to set the boost for a whole document by:

Document doc = new Document();
doc.add(new Field(...));
doc.add(new Field(...));
doc.add(new Field(...));
...
doc.Boost = (float)column.priority;

But this didn't do what I expected.

Then I tried to set the boost for every field I use in my search like:

Document doc = new Document();
if(){
   Field field = new Field(...);
   field.boost = (float)column.priority;
   doc.add(field);
}

But this also didn't work.

I also tried to use Luke to analyse the scoring but I can't find a special boosting factor in the result explain function.

Does someone know where is the mistake or is it a general misunderstanding of boosting?

Thanks for any answer or hint....MOE

0

There are 0 answers