[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [recommenders-dev] [snipmatch] search index
|
Hi Marcel,
We will improve the search function in the next two weeks, but not with Lucence, Doug would like to use on-line versioni SnipMatch's search solution. It works like this:
SnipMatch search algorithm:
1) First, we perform a keyword search, looking for each of the words
in the search query within the snippet _search patterns_ (defined by
the snippet creators - e.g. "lowercase $str"). If there is at least
one overlapping word, we consider a match to have been found.
2) Then, we rank the results and display the top ten. There are two
cases for ranking:
a) The search pattern (defined by the snippet creator - e.g.
"lowercase $str") is _in-order_ with respect to the search query (e.g.
the search query might be "lowercase a" or "low", etc.).
b) The search pattern is _not_ in order with respect to the search query
All in-order results are ranked higher than unordered results.
Finally, results are also ordered within these cases:
In-order ranking:
-results are ranked by the number of words in the search query
matching words in the search pattern. when there is a tie, we rank
results with fewer missing arguments (variables) higher.
Unordered ranking:
-results are only ranked by the number of words in the search query
matching words in the search pattern.
This description is complete, with one non-essential exception: in the
current implementation, we also search for the types of the local
variables that are mentioned in the search query - for example, if you
search for "a" and "a" is a local string, you'll see results such as
"lowercase a". This special case is easy to add once the rest is done.
I will discuss with Doug with the details of this algorithm soon. If you have any questions, maybe Doug can give you detailed explanation
--
Best Regards From Cheng Chen [
chengchendoc@xxxxxxxxx]