-------------------------------------------------------------------------------------------<div>Dear
Olly:</div><div>     thanks for your reply, my algorithm does compute the sum of a positive weight from each<br>matching term, and rank the documents. Maybe adding a weighting scheme will implement it.</div><div>But I am new to Xapian and have never read the source code of Xapian before, and I am a college </div>
<div>boy busy with my study all the day. I&#39;d like to describe to my algorithm in a document and share it,</div><div>would anybody in the community who is familiar with Xapian like to help me to implement it? :-)</div>
<div><br></div><div><br></div><div>best regard</div><div>------------------------------------------------------------------------------------------ </div><div><br><div class="gmail_quote">2012/10/9 Olly Betts <span dir="ltr">&lt;<a href="mailto:olly@survex.com" target="_blank">olly@survex.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Oct 04, 2012 at 11:48:13PM +0800, Jianping Wang wrote:<br>
&gt; Recently I invented a new ranking algorithm inspired by the theory of<br>
&gt; spread activation and probabilistic model, which can find the latent<br>
&gt; semantic relationship between docs and terms and is almost linear time, and<br>
&gt; I took one afternoon to code and implement this algorithm. And the testing<br>
&gt; result shows that the speed of this algorithm is much faster than the<br>
&gt; famous Latent Semantic Analysis algorithm, and the affect is almost as good<br>
&gt; as the LSA. I wanna share my idea to all of you and add this algorithm to<br>
&gt; the Xapian project.<br>
<br>
</div>Can you express your algorithm as a sum of a positive weight from each<br>
matching term, optionally plus a per-document component?  That&#39;s a<br>
requirement for it to be implementable within the Xapian matcher<br>
framework.  If it doesn&#39;t fit into this form, you&#39;ll need to do a lot<br>
more work to fit it into Xapian.<br>
<br>
If the algorithm is a product of a contribution per term, then taking<br>
the log may allow you to express it as such a sum.<br>
<br>
To implement a new weighting scheme, you need to subclass Xapian::Weight<br>
and implement several methods:<br>
<br>
<a href="http://trac.xapian.org/browser/trunk/xapian-core/include/xapian/weight.h" target="_blank">http://trac.xapian.org/browser/trunk/xapian-core/include/xapian/weight.h</a><br>
<br>
Cheers,<br>
    Olly<br>
</blockquote></div><br></div>