BlueZero_2
(BlueZero-2)
October 13, 2011, 1:46pm
1
I need to search nicknames with wildcard and sort them by
relevance(score).
But, when i do a query with wildcard, then the score is always 1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue " }
}
}
'
result:
"_score":1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue" }
}
}
'
result:
"_score":13.376108
Is there a way to get score also with wildcard?
Check it.
opened 07:06PM - 29 Jul 11 UTC
closed 09:49PM - 29 Jul 11 UTC
In the classe MapperQueryParser have the default value.
setMultiTermRewriteMeth… od(MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT);
when use wildcard i need to change this value to
setMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);
I know it is slow search. But is very important for me because i need do similary search like quora.com.
You need to set rewrite to scoring_boolean
2011/10/13 BlueZero bluezero@bluezero.sk :
I need to search nicknames with wildcard and sort them by
relevance(score).
But, when i do a query with wildcard, then the score is always 1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue " }
}
}
'
result:
"_score":1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue" }
}
}
'
result:
"_score":13.376108
Is there a way to get score also with wildcard?
--
Gustavo Maia
BlueZero_2
(BlueZero-2)
October 14, 2011, 6:59am
3
Didnt help at all
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue ", "rewrite":"scoring_boolean" }
}
}
'
score:1.1630663
Nick:bluehill
score:1.1630663
Nick:Boblue
score:1.1630663
Nick:blue723
score:1.1630663
Nick:blue_eyed
So every document has the same score. But shouldnt have.
On Oct 13, 4:13 pm, Gustavo Maia gustavobbm...@gmail.com wrote:
Check it.
WildcardQuery - dont use boost · Issue #1184 · elastic/elasticsearch · GitHub
You need to set rewrite to scoring_boolean
2011/10/13 BlueZero bluez...@bluezero.sk :
I need to search nicknames with wildcard and sort them by
relevance(score).
But, when i do a query with wildcard, then thescoreis always 1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue " }
}
}
'
result:
"_score":1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue" }
}
}
'
result:
"_score":13.376108
Is there a way to getscorealso with wildcard?
--
Gustavo Maia
1 Like
BlueZero_2
(BlueZero-2)
October 24, 2011, 11:29am
4
any suggestions? please.
On Oct 14, 8:59 am, BlueZero bluez...@bluezero.sk wrote:
Didnt help at all
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue ", "rewrite":"scoring_boolean" }
}}
'
score:1.1630663
Nick:bluehillscore:1.1630663
Nick:Bobluescore:1.1630663
Nick:blue723score:1.1630663
Nick:blue_eyed
So every document has the samescore. But shouldnt have.
On Oct 13, 4:13 pm, Gustavo Maia gustavobbm...@gmail.com wrote:
Check it.
WildcardQuery - dont use boost · Issue #1184 · elastic/elasticsearch · GitHub
You need to set rewrite to scoring_boolean
2011/10/13 BlueZero bluez...@bluezero.sk :
I need to search nicknames with wildcard and sort them by
relevance(score).
But, when i do a query with wildcard, then thescoreis always 1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue " }
}
}
'
result:
"_score":1.0
curl -XGET http://$HOST :$PORT/pokec/pouzivatelia/_search -d '{
"from" : 0,
"size": 10,
"query" : {
"query_string" : { "default_field":"Nick",
"query":"blue" }
}
}
'
result:
"_score":13.376108
Is there a way to getscorealso with wildcard?
--
Gustavo Maia