You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Dino Korah <dc...@gmail.com> on 2008/09/24 11:04:44 UTC
Index time Document Boosting and Query Time Sorts
Hi all,
Could you please help me understand hos that works.
If I boost documents at index time based on some kind of criteria and if I
am to sort on a different criteria at query time, how will the result get
affected by the boosting.
So if I am to index a bunch of text files in a folder structure. If I boost
individual documents based on the depth of the path. But when I search on
the file content and if I sort on the modification time, how will the result
be?
Eg: (boost is 1/depth)
Folder1/Folder2/Folder3/Folder4/Folder5/text_file1.txt,
mod-time:20080101000000, depth-factor: 1/5
Folder1/Folder2/text_file2.txt, mod-time:20080102000000, depth-factor: 1/2
Folder1/Folder2/Folder3/Folder4/text_file3.txt, mod-time:20080101000000,
depth-factor: 1/4
Folder1/Folder2/Folder3/Folder4/Folder5/text_file4.txt,
mod-time:20080105000000, depth-factor: 1/5
Many thanks.
Dino
Re: Index time Document Boosting and Query Time Sorts
Posted by Dino Korah <dc...@gmail.com>.
Cheers All
2008/9/24 Karl Wettin <ka...@gmail.com>
>
> 24 sep 2008 kl. 12.40 skrev Grant Ingersoll:
>
> One side note based on your example, below: Index time boosting does not
>> have much granularity (only 255 values), in other words, there is a loss of
>> precision. Thus, you
>> want to make sure your boosts are different enough such that you can
>> distinguish between the two. Maybe 1/(2*depth) or something like that. You
>> can alter how these 255 values are encoded, but that is fairly advanced
>> stuff.
>>
>
> Just a note, the granularity is 255 only if you turn off length
> normalization, if not it's something like 25.
>
>
> karl
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
--
d i n o k o r a h
Tel: +44 7956 66 52 83
---------------------------
51°21'50.5902"N 0°6'11.8116"W
Re: Index time Document Boosting and Query Time Sorts
Posted by Karl Wettin <ka...@gmail.com>.
24 sep 2008 kl. 12.40 skrev Grant Ingersoll:
> One side note based on your example, below: Index time boosting
> does not have much granularity (only 255 values), in other words,
> there is a loss of precision. Thus, you
> want to make sure your boosts are different enough such that you can
> distinguish between the two. Maybe 1/(2*depth) or something like
> that. You can alter how these 255 values are encoded, but that is
> fairly advanced stuff.
Just a note, the granularity is 255 only if you turn off length
normalization, if not it's something like 25.
karl
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Index time Document Boosting and Query Time Sorts
Posted by Grant Ingersoll <gs...@apache.org>.
On Sep 24, 2008, at 5:04 AM, Dino Korah wrote:
> Hi all,
>
> Could you please help me understand hos that works.
>
> If I boost documents at index time based on some kind of criteria
> and if I
> am to sort on a different criteria at query time, how will the
> result get
> affected by the boosting.
>
>
> So if I am to index a bunch of text files in a folder structure. If
> I boost
> individual documents based on the depth of the path. But when I
> search on
> the file content and if I sort on the modification time, how will
> the result
> be?
Index time boosting is used to say Document A is more important than
Document B. Thus, if all else being equal between the two, Doc A will
score higher. Sorting on other
values has no bearing on the scoring. Thus, if you sort by mod time,
you may see doc B higher in the list b/c of it's mod time, but it's
score would still be lower than A's.
One side note based on your example, below: Index time boosting does
not have much granularity (only 255 values), in other words, there is
a loss of precision. Thus, you
want to make sure your boosts are different enough such that you can
distinguish between the two. Maybe 1/(2*depth) or something like
that. You can alter how these 255 values are encoded, but that is
fairly advanced stuff.
HTH,
Grant
>
>
> Eg: (boost is 1/depth)
> Folder1/Folder2/Folder3/Folder4/Folder5/text_file1.txt,
> mod-time:20080101000000, depth-factor: 1/5
> Folder1/Folder2/text_file2.txt, mod-time:20080102000000, depth-
> factor: 1/2
> Folder1/Folder2/Folder3/Folder4/text_file3.txt, mod-time:
> 20080101000000,
> depth-factor: 1/4
> Folder1/Folder2/Folder3/Folder4/Folder5/text_file4.txt,
> mod-time:20080105000000, depth-factor: 1/5
>
> Many thanks.
> Dino
--------------------------
Grant Ingersoll
http://www.lucidimagination.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org