Custom document scorer


(jeroens) #1

Hello,

I was wondering if it is possible to get back the highest scoring index for
a field within an array.
Let's say I have the following document:

{
"tweet" : {
"message" : "some arrays in this tweet...",
"tags" : ["elasticsearch", "wow"],
"lists" : [
{
"name" : "cool_list1",
"description" : "very cool"
},
{
"name" : "cool_list2",
"description" : "cool"
}
]
}
}

I'm searching for: tweet.lists.description:cool

Now I would like to get back the array index with the highest relevancy.
This would be the second one where it says "cool". Is there a way for me to
implement this?

I have been using Solr for a long time now, but I really like how easy ES
works and the fantastic scalability features. However, I am missing the
advanced extendibility possibilities that I have with Solr. Or am I missing
something?

Kind regards,

Jeroen


(Shay Banon) #2

In this case, you would need to break each item in the list into a different
document. What feature in Solr allows you to do it?

On Fri, Nov 26, 2010 at 1:39 AM, jeroens jeroen.steggink@gmail.com wrote:

Hello,

I was wondering if it is possible to get back the highest scoring index for
a field within an array.
Let's say I have the following document:

{
"tweet" : {
"message" : "some arrays in this tweet...",
"tags" : ["elasticsearch", "wow"],
"lists" : [
{
"name" : "cool_list1",
"description" : "very cool"
},
{
"name" : "cool_list2",
"description" : "cool"
}
]
}
}

I'm searching for: tweet.lists.description:cool

Now I would like to get back the array index with the highest relevancy.
This would be the second one where it says "cool". Is there a way for me to
implement this?

I have been using Solr for a long time now, but I really like how easy ES
works and the fantastic scalability features. However, I am missing the
advanced extendibility possibilities that I have with Solr. Or am I missing
something?

Kind regards,

Jeroen

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Custom-document-scorer-tp1970264p1970264.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(jeroens) #3

I do this in Solr by using a custom similarity class.
http://wiki.apache.org/solr/SolrPlugins#Similarity


(Shay Banon) #4

You can plug in your own Lucene similarity implementation to elasticsearch.
Not properly documented yet, but ping and I can help once you want to do it.

On Sat, Nov 27, 2010 at 10:54 PM, jeroens jeroen.steggink@gmail.com wrote:

I do this in Solr by using a custom similarity class.
http://wiki.apache.org/solr/SolrPlugins#Similarity

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Custom-document-scorer-tp1970264p1979090.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(system) #5