Filter results list


(Karma) #1

Let's say after query i get a bunch of documents (web pages) but some
of them having same excerpts and score within same domain and i need
to filter them out living only the first of such occurences, how do i
accomplish that?

Thanks in advance.


(Karma) #2

can i scan through list of result and do something like this?

var previous_domain
var previous_score

func filterspam(currentdoc) {
if currentdoc.domain == previous_domain && currentdoc.score ==
previous_score {
skipdoc(currentdoc)
return
}
previous_domain = currentdoc.domain
previous_score = currentdoc.score
return
}

On May 22, 2:09 pm, Karma akmal...@gmail.com wrote:

Let's say after query i get a bunch of documents (web pages) but some
of them having same excerpts and score within same domain and i need
to filter them out living only the first of such occurences, how do i
accomplish that?

Thanks in advance.


(system) #3