Wierd scoring

Hello

I'm currently building a search using elasticsearch and I'm getting some
wierd results
"query" : { "match_phrase_prefix" : { "name" : "agnes" } } <-- this query
gives "Carin Agneta Axeltorp" a higher score then "St. Agnes"
how can this be as the second one is a more exact match

Kristofer

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

There are many factors involved with scoring. Can you post the explain
output of that query?

Without looking at the explain, my guess was that the IDF contributed to
the higher scoring of the first document. How many shards and documents do
you have? With a low document count and more than one shard, the IDF can
result in inconsistencies (which tend to get corrected as the document
count gets higher).

Cheers,

Ivan

On Wed, Sep 18, 2013 at 7:55 AM, kristofer@otilia.se wrote:

Hello

I'm currently building a search using elasticsearch and I'm getting some
wierd results
"query" : { "match_phrase_prefix" : { "name" : "agnes" } } <-- this query
gives "Carin Agneta Axeltorp" a higher score then "St. Agnes"
how can this be as the second one is a more exact match

Kristofer

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

in that type-call there are ~4600 documents but there's the same problem in
another type and that one has over 400 000 documents.

As I'm really new to this I don' know how to check how many shards I have,
how to set them and how many I should have so that might be the issue

On Wed, Sep 18, 2013 at 6:12 PM, Ivan Brusic ivan@brusic.com wrote:

There are many factors involved with scoring. Can you post the explain
output of that query?

Without looking at the explain, my guess was that the IDF contributed to
the higher scoring of the first document. How many shards and documents do
you have? With a low document count and more than one shard, the IDF can
result in inconsistencies (which tend to get corrected as the document
count gets higher).

Cheers,

Ivan

On Wed, Sep 18, 2013 at 7:55 AM, kristofer@otilia.se wrote:

Hello

I'm currently building a search using elasticsearch and I'm getting some
wierd results
"query" : { "match_phrase_prefix" : { "name" : "agnes" } } <-- this query
gives "Carin Agneta Axeltorp" a higher score then "St. Agnes"
how can this be as the second one is a more exact match

Kristofer

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

As Ivan mentioned, it would be easier to help if you have the result of
scoring explained. You could achieve this by appending "explain" : true to
the query:

"query" : { "match_phrase_prefix" : { "name" : "agnes" } }, "explain" : true

As for the number of shards and documents take a look at:
http://www.elasticsearch.org/guide/reference/api/admin-indices-get-settings/
http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-stats/

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

"query" : { "match_phrase_prefix" : { "company.name" : "agnes" } },
"explain" : true

I'm guessing this is more info then needed for this senario but here goes
the full response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 4406

{
"took":2,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":8,
"max_score":5.593096,
"hits":[
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"352",
"_score":5.593096,
"_source":{
"id":"352",
"company":{
"name":"Tandl\u00e4kare Agneta Hultin Tandl\u00e4karhuset"
},

"url_structure":"/stockholm/\u00e5kersberga/tandl\u00e4kare-agneta-hultin-tandl\u00e4karhuset",
"street_address":"Saturnusv\u00e4gen 2",
"subscription_id":"1",
"img":"",
"city":"\u00c5kersberga",
"tstamp":"2013-02-21T13:51:26",
"location":"59.477667565305000000,18.295774234384000000",
"_boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 88)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 88, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3, maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=88)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2291",
"_score":5.593096,
"_source":{
"id":"2291",
"company":{
"name":"Carin Agneta Axeltorp"
},
"url_structure":"/sk\u00e5ne/limhamn/carin-agneta-axeltorp",
"street_address":"Abbedissgatan 7",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:47",
"location":"55.572641300000000797,12.951067099999999499",
" _boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 571)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 571, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3, maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=571)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"881",
"_score":5.5646315,
"_source":{
"id":"881",
"company":{
"name":"St. Agnes"
},
"url_structure":"/v\u00e4stra
g\u00f6taland/alings\u00e5s/st.-agnes",
"street_address":"V\u00e4stra Ringgatan 1 A",
"subscription_id":"1",
"img":"",
"city":"Alings\u00e5s",
"tstamp":"2012-11-14T01:37:26",
"location":"57.931587100000001556,12.529198600000000852",
"_boost":"1.0"
},
"_explanation":{
"value":5.5646315,
"description":"sum of:",
"details":[
{
"value":5.5646315,
"description":"weight(company.name:agn in 218)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.5646315,
"description":"score(doc=218,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.74948466,
"description":"queryWeight, product of:",
"details":[
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.06309125,
"description":"queryNorm"
}
]
},
{
"value":7.42461,
"description":"fieldWeight in 218, product
of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.625,
"description":"fieldNorm(doc=218)"
}
]
}
]
}
]
}
]
}
},
{
"_shard":0,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2432",
"_score":3.9855573,
"_source":{
"id":"2432",
"company":{
"name":"Tandl\u00e4kare Agneta Knutsson"
},

"url_structure":"/sk\u00e5ne/limhamn/tandl\u00e4kare-agneta-knutsson",
"street_address":"Geijersgatan 8",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:49",
"location":"55.590610499999996819,12.941211600000000814",
"_boost":"1.0"
},
"_explanation":{
"value":3.9855573,
"description":"sum of:",
"details":[
{
"value":3.9855573,
"description":"weight(company.name:agnet in 609)
[PerFieldSimilarity], result of:",
"details":[
{
"value":3.9855573,
"description":"score(doc=609,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.694725,
"description":"queryWeight, product of:",
"details":[
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.060548972,
"description":"queryNorm"
}
]
},
{
"value":5.736885,
"description":"fieldWeight in 609, product
of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.5,
"description":"fieldNorm(doc=609)"
}
]
}
]
}
]
}
]
}
}
]
}
}

On Thu, Sep 19, 2013 at 9:12 AM, sina.tamanna@gmail.com wrote:

As Ivan mentioned, it would be easier to help if you have the result of
scoring explained. You could achieve this by appending "explain" : true to
the query:

"query" : { "match_phrase_prefix" : { "name" : "agnes" } }, "explain" :
true

As for the number of shards and documents take a look at:

Elasticsearch Platform — Find real-time answers at scale | Elastic
Elasticsearch Platform — Find real-time answers at scale | Elastic

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

and I think I have 4 shards

On Thu, Sep 19, 2013 at 10:01 AM, Kristofer Hamnell kristofer@otilia.sewrote:

"query" : { "match_phrase_prefix" : { "company.name" : "agnes" } },
"explain" : true

I'm guessing this is more info then needed for this senario but here goes
the full response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 4406

{
"took":2,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":8,
"max_score":5.593096,
"hits":[
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"352",
"_score":5.593096,
"_source":{
"id":"352",
"company":{
"name":"Tandl\u00e4kare Agneta Hultin
Tandl\u00e4karhuset"
},

"url_structure":"/stockholm/\u00e5kersberga/tandl\u00e4kare-agneta-hultin-tandl\u00e4karhuset",
"street_address":"Saturnusv\u00e4gen 2",
"subscription_id":"1",
"img":"",
"city":"\u00c5kersberga",
"tstamp":"2013-02-21T13:51:26",
"location":"59.477667565305000000,18.295774234384000000",
"_boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 88)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 88, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3, maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=88)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2291",
"_score":5.593096,
"_source":{
"id":"2291",
"company":{
"name":"Carin Agneta Axeltorp"
},
"url_structure":"/sk\u00e5ne/limhamn/carin-agneta-axeltorp",
"street_address":"Abbedissgatan 7",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:47",
"location":"55.572641300000000797,12.951067099999999499",
" _boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 571)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 571, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3, maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=571)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"881",
"_score":5.5646315,
"_source":{
"id":"881",
"company":{
"name":"St. Agnes"
},
"url_structure":"/v\u00e4stra
g\u00f6taland/alings\u00e5s/st.-agnes",
"street_address":"V\u00e4stra Ringgatan 1 A",
"subscription_id":"1",
"img":"",
"city":"Alings\u00e5s",
"tstamp":"2012-11-14T01:37:26",
"location":"57.931587100000001556,12.529198600000000852",
"_boost":"1.0"
},
"_explanation":{
"value":5.5646315,
"description":"sum of:",
"details":[
{
"value":5.5646315,
"description":"weight(company.name:agn in 218)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.5646315,
"description":"score(doc=218,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.74948466,
"description":"queryWeight, product of:",
"details":[
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.06309125,
"description":"queryNorm"
}
]
},
{
"value":7.42461,
"description":"fieldWeight in 218,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.625,
"description":"fieldNorm(doc=218)"
}
]
}
]
}
]
}
]
}
},
{
"_shard":0,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2432",
"_score":3.9855573,
"_source":{
"id":"2432",
"company":{
"name":"Tandl\u00e4kare Agneta Knutsson"
},

"url_structure":"/sk\u00e5ne/limhamn/tandl\u00e4kare-agneta-knutsson",
"street_address":"Geijersgatan 8",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:49",
"location":"55.590610499999996819,12.941211600000000814",
"_boost":"1.0"
},
"_explanation":{
"value":3.9855573,
"description":"sum of:",
"details":[
{
"value":3.9855573,
"description":"weight(company.name:agnet in 609)
[PerFieldSimilarity], result of:",
"details":[
{
"value":3.9855573,
"description":"score(doc=609,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.694725,
"description":"queryWeight, product of:",
"details":[
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.060548972,
"description":"queryNorm"
}
]
},
{
"value":5.736885,
"description":"fieldWeight in 609,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.5,
"description":"fieldNorm(doc=609)"
}
]
}
]
}
]
}
]
}
}
]
}
}

On Thu, Sep 19, 2013 at 9:12 AM, sina.tamanna@gmail.com wrote:

As Ivan mentioned, it would be easier to help if you have the result of
scoring explained. You could achieve this by appending "explain" : true to
the query:

"query" : { "match_phrase_prefix" : { "name" : "agnes" } }, "explain" :
true

As for the number of shards and documents take a look at:

Elasticsearch Platform — Find real-time answers at scale | Elastic

Elasticsearch Platform — Find real-time answers at scale | Elastic

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You do have four shards and in your case they are working in your favor
since the document you wish to have a higher score actually has a higher
IDF.

I have not used prefix queries in a long time, so I don't have any answers
regarding the scoring. The scores are really close! For some reason,
the St. Agnes document has its higher TD-IDF value reduced by the
queryNorm, while the other documents do not factor in the queryNorm. I'm
guess the prefix query expansion has something to do with it. Not sure why
the first two document even match since their name does not match the
prefix. The playing around with the fuzziness and expansion settings.

Cheers,

Ivan

On Thu, Sep 19, 2013 at 1:02 AM, Kristofer Hamnell kristofer@otilia.sewrote:

and I think I have 4 shards

On Thu, Sep 19, 2013 at 10:01 AM, Kristofer Hamnell kristofer@otilia.sewrote:

"query" : { "match_phrase_prefix" : { "company.name" : "agnes" } },
"explain" : true

I'm guessing this is more info then needed for this senario but here goes
the full response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 4406

{
"took":2,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":8,
"max_score":5.593096,
"hits":[
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"352",
"_score":5.593096,
"_source":{
"id":"352",
"company":{
"name":"Tandl\u00e4kare Agneta Hultin
Tandl\u00e4karhuset"
},

"url_structure":"/stockholm/\u00e5kersberga/tandl\u00e4kare-agneta-hultin-tandl\u00e4karhuset",
"street_address":"Saturnusv\u00e4gen 2",
"subscription_id":"1",
"img":"",
"city":"\u00c5kersberga",
"tstamp":"2013-02-21T13:51:26",
"location":"59.477667565305000000,18.295774234384000000",
"_boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 88)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 88, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3, maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=88)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2291",
"_score":5.593096,
"_source":{
"id":"2291",
"company":{
"name":"Carin Agneta Axeltorp"
},

"url_structure":"/sk\u00e5ne/limhamn/carin-agneta-axeltorp",
"street_address":"Abbedissgatan 7",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:47",
"location":"55.572641300000000797,12.951067099999999499",
" _boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 571)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 571, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3, maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=571)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"881",
"_score":5.5646315,
"_source":{
"id":"881",
"company":{
"name":"St. Agnes"
},
"url_structure":"/v\u00e4stra
g\u00f6taland/alings\u00e5s/st.-agnes",
"street_address":"V\u00e4stra Ringgatan 1 A",
"subscription_id":"1",
"img":"",
"city":"Alings\u00e5s",
"tstamp":"2012-11-14T01:37:26",
"location":"57.931587100000001556,12.529198600000000852",
"_boost":"1.0"
},
"_explanation":{
"value":5.5646315,
"description":"sum of:",
"details":[
{
"value":5.5646315,
"description":"weight(company.name:agn in 218)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.5646315,
"description":"score(doc=218,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.74948466,
"description":"queryWeight, product of:",
"details":[
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.06309125,
"description":"queryNorm"
}
]
},
{
"value":7.42461,
"description":"fieldWeight in 218,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.625,
"description":"fieldNorm(doc=218)"
}
]
}
]
}
]
}
]
}
},
{
"_shard":0,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2432",
"_score":3.9855573,
"_source":{
"id":"2432",
"company":{
"name":"Tandl\u00e4kare Agneta Knutsson"
},

"url_structure":"/sk\u00e5ne/limhamn/tandl\u00e4kare-agneta-knutsson",
"street_address":"Geijersgatan 8",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:49",
"location":"55.590610499999996819,12.941211600000000814",
"_boost":"1.0"
},
"_explanation":{
"value":3.9855573,
"description":"sum of:",
"details":[
{
"value":3.9855573,
"description":"weight(company.name:agnet in 609)
[PerFieldSimilarity], result of:",
"details":[
{
"value":3.9855573,
"description":"score(doc=609,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.694725,
"description":"queryWeight, product of:",
"details":[
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.060548972,
"description":"queryNorm"
}
]
},
{
"value":5.736885,
"description":"fieldWeight in 609,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.5,
"description":"fieldNorm(doc=609)"
}
]
}
]
}
]
}
]
}
}
]
}
}

On Thu, Sep 19, 2013 at 9:12 AM, sina.tamanna@gmail.com wrote:

As Ivan mentioned, it would be easier to help if you have the result of
scoring explained. You could achieve this by appending "explain" : true to
the query:

"query" : { "match_phrase_prefix" : { "name" : "agnes" } }, "explain" :
true

As for the number of shards and documents take a look at:

Elasticsearch Platform — Find real-time answers at scale | Elastic

Elasticsearch Platform — Find real-time answers at scale | Elastic

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

is there a better way to search then with prefix for what I'm trying to do
then?

On Thu, Sep 19, 2013 at 7:15 PM, Ivan Brusic ivan@brusic.com wrote:

You do have four shards and in your case they are working in your favor
since the document you wish to have a higher score actually has a higher
IDF.

I have not used prefix queries in a long time, so I don't have any answers
regarding the scoring. The scores are really close! For some reason,
the St. Agnes document has its higher TD-IDF value reduced by the
queryNorm, while the other documents do not factor in the queryNorm. I'm
guess the prefix query expansion has something to do with it. Not sure why
the first two document even match since their name does not match the
prefix. The playing around with the fuzziness and expansion settings.

Cheers,

Ivan

On Thu, Sep 19, 2013 at 1:02 AM, Kristofer Hamnell kristofer@otilia.sewrote:

and I think I have 4 shards

On Thu, Sep 19, 2013 at 10:01 AM, Kristofer Hamnell kristofer@otilia.sewrote:

"query" : { "match_phrase_prefix" : { "company.name" : "agnes" } },
"explain" : true

I'm guessing this is more info then needed for this senario but here
goes the full response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 4406

{
"took":2,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":8,
"max_score":5.593096,
"hits":[
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"352",
"_score":5.593096,
"_source":{
"id":"352",
"company":{
"name":"Tandl\u00e4kare Agneta Hultin
Tandl\u00e4karhuset"
},

"url_structure":"/stockholm/\u00e5kersberga/tandl\u00e4kare-agneta-hultin-tandl\u00e4karhuset",
"street_address":"Saturnusv\u00e4gen 2",
"subscription_id":"1",
"img":"",
"city":"\u00c5kersberga",
"tstamp":"2013-02-21T13:51:26",
"location":"59.477667565305000000,18.295774234384000000",
"_boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 88)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 88, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3, maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=88)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2291",
"_score":5.593096,
"_source":{
"id":"2291",
"company":{
"name":"Carin Agneta Axeltorp"
},

"url_structure":"/sk\u00e5ne/limhamn/carin-agneta-axeltorp",
"street_address":"Abbedissgatan 7",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:47",
"location":"55.572641300000000797,12.951067099999999499",
" _boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 571)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 571, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3,
maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=571)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"881",
"_score":5.5646315,
"_source":{
"id":"881",
"company":{
"name":"St. Agnes"
},
"url_structure":"/v\u00e4stra
g\u00f6taland/alings\u00e5s/st.-agnes",
"street_address":"V\u00e4stra Ringgatan 1 A",
"subscription_id":"1",
"img":"",
"city":"Alings\u00e5s",
"tstamp":"2012-11-14T01:37:26",
"location":"57.931587100000001556,12.529198600000000852",
"_boost":"1.0"
},
"_explanation":{
"value":5.5646315,
"description":"sum of:",
"details":[
{
"value":5.5646315,
"description":"weight(company.name:agn in 218)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.5646315,
"description":"score(doc=218,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.74948466,
"description":"queryWeight, product
of:",
"details":[
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.06309125,
"description":"queryNorm"
}
]
},
{
"value":7.42461,
"description":"fieldWeight in 218,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.625,
"description":"fieldNorm(doc=218)"
}
]
}
]
}
]
}
]
}
},
{
"_shard":0,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2432",
"_score":3.9855573,
"_source":{
"id":"2432",
"company":{
"name":"Tandl\u00e4kare Agneta Knutsson"
},

"url_structure":"/sk\u00e5ne/limhamn/tandl\u00e4kare-agneta-knutsson",
"street_address":"Geijersgatan 8",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:49",
"location":"55.590610499999996819,12.941211600000000814",
"_boost":"1.0"
},
"_explanation":{
"value":3.9855573,
"description":"sum of:",
"details":[
{
"value":3.9855573,
"description":"weight(company.name:agnet in 609)
[PerFieldSimilarity], result of:",
"details":[
{
"value":3.9855573,
"description":"score(doc=609,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.694725,
"description":"queryWeight, product
of:",
"details":[
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.060548972,
"description":"queryNorm"
}
]
},
{
"value":5.736885,
"description":"fieldWeight in 609,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with
freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.5,
"description":"fieldNorm(doc=609)"
}
]
}
]
}
]
}
]
}
}
]
}
}

On Thu, Sep 19, 2013 at 9:12 AM, sina.tamanna@gmail.com wrote:

As Ivan mentioned, it would be easier to help if you have the result of
scoring explained. You could achieve this by appending "explain" : true to
the query:

"query" : { "match_phrase_prefix" : { "name" : "agnes" } }, "explain"
: true

As for the number of shards and documents take a look at:

Elasticsearch Platform — Find real-time answers at scale | Elastic

Elasticsearch Platform — Find real-time answers at scale | Elastic

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Try using ngrams, which has a more predictable outcome than prefix query
expansion, IMHO. However, perhaps someone can help you with the normal
prefix query.

--
Ivan

On Thu, Sep 19, 2013 at 11:29 PM, Kristofer Hamnell kristofer@otilia.sewrote:

is there a better way to search then with prefix for what I'm trying to do
then?

On Thu, Sep 19, 2013 at 7:15 PM, Ivan Brusic ivan@brusic.com wrote:

You do have four shards and in your case they are working in your favor
since the document you wish to have a higher score actually has a higher
IDF.

I have not used prefix queries in a long time, so I don't have any
answers regarding the scoring. The scores are really close! For some
reason, the St. Agnes document has its higher TD-IDF value reduced by the
queryNorm, while the other documents do not factor in the queryNorm. I'm
guess the prefix query expansion has something to do with it. Not sure why
the first two document even match since their name does not match the
prefix. The playing around with the fuzziness and expansion settings.

Cheers,

Ivan

On Thu, Sep 19, 2013 at 1:02 AM, Kristofer Hamnell kristofer@otilia.sewrote:

and I think I have 4 shards

On Thu, Sep 19, 2013 at 10:01 AM, Kristofer Hamnell <kristofer@otilia.se

wrote:

"query" : { "match_phrase_prefix" : { "company.name" : "agnes" } },
"explain" : true

I'm guessing this is more info then needed for this senario but here
goes the full response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 4406

{
"took":2,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":8,
"max_score":5.593096,
"hits":[
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"352",
"_score":5.593096,
"_source":{
"id":"352",
"company":{
"name":"Tandl\u00e4kare Agneta Hultin
Tandl\u00e4karhuset"
},

"url_structure":"/stockholm/\u00e5kersberga/tandl\u00e4kare-agneta-hultin-tandl\u00e4karhuset",
"street_address":"Saturnusv\u00e4gen 2",
"subscription_id":"1",
"img":"",
"city":"\u00c5kersberga",
"tstamp":"2013-02-21T13:51:26",
"location":"59.477667565305000000,18.295774234384000000",
"_boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 88)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 88, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3,
maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=88)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2291",
"_score":5.593096,
"_source":{
"id":"2291",
"company":{
"name":"Carin Agneta Axeltorp"
},

"url_structure":"/sk\u00e5ne/limhamn/carin-agneta-axeltorp",
"street_address":"Abbedissgatan 7",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:47",
"location":"55.572641300000000797,12.951067099999999499",
" _boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 571)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 571, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3,
maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=571)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"881",
"_score":5.5646315,
"_source":{
"id":"881",
"company":{
"name":"St. Agnes"
},
"url_structure":"/v\u00e4stra
g\u00f6taland/alings\u00e5s/st.-agnes",
"street_address":"V\u00e4stra Ringgatan 1 A",
"subscription_id":"1",
"img":"",
"city":"Alings\u00e5s",
"tstamp":"2012-11-14T01:37:26",
"location":"57.931587100000001556,12.529198600000000852",
"_boost":"1.0"
},
"_explanation":{
"value":5.5646315,
"description":"sum of:",
"details":[
{
"value":5.5646315,
"description":"weight(company.name:agn in 218)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.5646315,
"description":"score(doc=218,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.74948466,
"description":"queryWeight, product
of:",
"details":[
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.06309125,
"description":"queryNorm"
}
]
},
{
"value":7.42461,
"description":"fieldWeight in 218,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0),
with freq of:",
"details":[
{
"value":1.0,

"description":"termFreq=1.0"
}
]
},
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.625,

"description":"fieldNorm(doc=218)"
}
]
}
]
}
]
}
]
}
},
{
"_shard":0,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2432",
"_score":3.9855573,
"_source":{
"id":"2432",
"company":{
"name":"Tandl\u00e4kare Agneta Knutsson"
},

"url_structure":"/sk\u00e5ne/limhamn/tandl\u00e4kare-agneta-knutsson",
"street_address":"Geijersgatan 8",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:49",
"location":"55.590610499999996819,12.941211600000000814",
"_boost":"1.0"
},
"_explanation":{
"value":3.9855573,
"description":"sum of:",
"details":[
{
"value":3.9855573,
"description":"weight(company.name:agnet in 609)
[PerFieldSimilarity], result of:",
"details":[
{
"value":3.9855573,
"description":"score(doc=609,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.694725,
"description":"queryWeight, product
of:",
"details":[
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.060548972,
"description":"queryNorm"
}
]
},
{
"value":5.736885,
"description":"fieldWeight in 609,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0),
with freq of:",
"details":[
{
"value":1.0,

"description":"termFreq=1.0"
}
]
},
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.5,

"description":"fieldNorm(doc=609)"
}
]
}
]
}
]
}
]
}
}
]
}
}

On Thu, Sep 19, 2013 at 9:12 AM, sina.tamanna@gmail.com wrote:

As Ivan mentioned, it would be easier to help if you have the result
of scoring explained. You could achieve this by appending "explain" : true
to the query:

"query" : { "match_phrase_prefix" : { "name" : "agnes" } }, "explain"
: true

As for the number of shards and documents take a look at:

Elasticsearch Platform — Find real-time answers at scale | Elastic

Elasticsearch Platform — Find real-time answers at scale | Elastic

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks a million for all the help, I'll look into ngrams
Den 20 sep 2013 18:21 skrev "Ivan Brusic" ivan@brusic.com:

Try using ngrams, which has a more predictable outcome than prefix query
expansion, IMHO. However, perhaps someone can help you with the normal
prefix query.

--
Ivan

On Thu, Sep 19, 2013 at 11:29 PM, Kristofer Hamnell kristofer@otilia.sewrote:

is there a better way to search then with prefix for what I'm trying to
do then?

On Thu, Sep 19, 2013 at 7:15 PM, Ivan Brusic ivan@brusic.com wrote:

You do have four shards and in your case they are working in your favor
since the document you wish to have a higher score actually has a higher
IDF.

I have not used prefix queries in a long time, so I don't have any
answers regarding the scoring. The scores are really close! For some
reason, the St. Agnes document has its higher TD-IDF value reduced by the
queryNorm, while the other documents do not factor in the queryNorm. I'm
guess the prefix query expansion has something to do with it. Not sure why
the first two document even match since their name does not match the
prefix. The playing around with the fuzziness and expansion settings.

Cheers,

Ivan

On Thu, Sep 19, 2013 at 1:02 AM, Kristofer Hamnell kristofer@otilia.sewrote:

and I think I have 4 shards

On Thu, Sep 19, 2013 at 10:01 AM, Kristofer Hamnell <
kristofer@otilia.se> wrote:

"query" : { "match_phrase_prefix" : { "company.name" : "agnes" } },
"explain" : true

I'm guessing this is more info then needed for this senario but here
goes the full response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 4406

{
"took":2,
"timed_out":false,
"_shards":{
"total":4,
"successful":4,
"failed":0
},
"hits":{
"total":8,
"max_score":5.593096,
"hits":[
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"352",
"_score":5.593096,
"_source":{
"id":"352",
"company":{
"name":"Tandl\u00e4kare Agneta Hultin
Tandl\u00e4karhuset"
},

"url_structure":"/stockholm/\u00e5kersberga/tandl\u00e4kare-agneta-hultin-tandl\u00e4karhuset",
"street_address":"Saturnusv\u00e4gen 2",
"subscription_id":"1",
"img":"",
"city":"\u00c5kersberga",
"tstamp":"2013-02-21T13:51:26",

"location":"59.477667565305000000,18.295774234384000000",
"_boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 88)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 88, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3,
maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=88)"
}
]
}
]
}
},
{
"_shard":3,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2291",
"_score":5.593096,
"_source":{
"id":"2291",
"company":{
"name":"Carin Agneta Axeltorp"
},

"url_structure":"/sk\u00e5ne/limhamn/carin-agneta-axeltorp",
"street_address":"Abbedissgatan 7",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:47",

"location":"55.572641300000000797,12.951067099999999499",
" _boost":"1.0"
},
"_explanation":{
"value":5.593096,
"description":"weight(company.name:agnet in 571)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.593096,
"description":"fieldWeight in 571, product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0), with freq of:",
"details":[
{
"value":1.0,
"description":"termFreq=1.0"
}
]
},
{
"value":11.186192,
"description":"idf(docFreq=3,
maxDocs=106137)"
},
{
"value":0.5,
"description":"fieldNorm(doc=571)"
}
]
}
]
}
},
{
"_shard":2,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"881",
"_score":5.5646315,
"_source":{
"id":"881",
"company":{
"name":"St. Agnes"
},
"url_structure":"/v\u00e4stra
g\u00f6taland/alings\u00e5s/st.-agnes",
"street_address":"V\u00e4stra Ringgatan 1 A",
"subscription_id":"1",
"img":"",
"city":"Alings\u00e5s",
"tstamp":"2012-11-14T01:37:26",

"location":"57.931587100000001556,12.529198600000000852",
"_boost":"1.0"
},
"_explanation":{
"value":5.5646315,
"description":"sum of:",
"details":[
{
"value":5.5646315,
"description":"weight(company.name:agn in 218)
[PerFieldSimilarity], result of:",
"details":[
{
"value":5.5646315,
"description":"score(doc=218,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.74948466,
"description":"queryWeight, product
of:",
"details":[
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.06309125,
"description":"queryNorm"
}
]
},
{
"value":7.42461,
"description":"fieldWeight in 218,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0),
with freq of:",
"details":[
{
"value":1.0,

"description":"termFreq=1.0"
}
]
},
{
"value":11.879376,
"description":"idf(docFreq=1,
maxDocs=106141)"
},
{
"value":0.625,

"description":"fieldNorm(doc=218)"
}
]
}
]
}
]
}
]
}
},
{
"_shard":0,
"_node":"Z7swhx3jR-6oZWQ47bYkIw",
"_index":"tandlakare",
"_type":"view_data",
"_id":"2432",
"_score":3.9855573,
"_source":{
"id":"2432",
"company":{
"name":"Tandl\u00e4kare Agneta Knutsson"
},

"url_structure":"/sk\u00e5ne/limhamn/tandl\u00e4kare-agneta-knutsson",
"street_address":"Geijersgatan 8",
"subscription_id":"1",
"img":"",
"city":"Limhamn",
"tstamp":"2012-11-14T01:37:49",

"location":"55.590610499999996819,12.941211600000000814",
"_boost":"1.0"
},
"_explanation":{
"value":3.9855573,
"description":"sum of:",
"details":[
{
"value":3.9855573,
"description":"weight(company.name:agnet in 609)
[PerFieldSimilarity], result of:",
"details":[
{
"value":3.9855573,
"description":"score(doc=609,freq=1.0 =
termFreq=1.0\n), product of:",
"details":[
{
"value":0.694725,
"description":"queryWeight, product
of:",
"details":[
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.060548972,
"description":"queryNorm"
}
]
},
{
"value":5.736885,
"description":"fieldWeight in 609,
product of:",
"details":[
{
"value":1.0,
"description":"tf(freq=1.0),
with freq of:",
"details":[
{
"value":1.0,

"description":"termFreq=1.0"
}
]
},
{
"value":11.47377,
"description":"idf(docFreq=2,
maxDocs=106126)"
},
{
"value":0.5,

"description":"fieldNorm(doc=609)"
}
]
}
]
}
]
}
]
}
}
]
}
}

On Thu, Sep 19, 2013 at 9:12 AM, sina.tamanna@gmail.com wrote:

As Ivan mentioned, it would be easier to help if you have the result
of scoring explained. You could achieve this by appending "explain" : true
to the query:

"query" : { "match_phrase_prefix" : { "name" : "agnes" } }, "explain"
: true

As for the number of shards and documents take a look at:

Elasticsearch Platform — Find real-time answers at scale | Elastic

Elasticsearch Platform — Find real-time answers at scale | Elastic

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/at_AzCukPJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.