Stored and term_vector can impact hits order?


(Lukáš Vlček) #1

Hi,

May be it is just a random observation but I noticed interesting situation.
I am running one server node with index having 4 shards (no replicas). Now,
when I index data and issue a query like "+term1 term2" then I get some hits
back. I noticed that two hits (out of the ten most relevant hits) switched
positions if I changed mapping for "_all" to { "store" : "yes",
"term_vector" : "with_positions_offsets" }.
It is worth noting that both the hits have the same value of score but it
seems as it was guarantied that if _all is not stored and with no
term_vector then the order of those two documents is reversed.

Regards,
Lukas


(Shay Banon) #2

If they have the same score, then the order depends on several factors
internal to how Lucene works. Not really sure why you care.

On Wed, Jul 21, 2010 at 4:23 PM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

May be it is just a random observation but I noticed interesting situation.
I am running one server node with index having 4 shards (no replicas). Now,
when I index data and issue a query like "+term1 term2" then I get some hits
back. I noticed that two hits (out of the ten most relevant hits) switched
positions if I changed mapping for "_all" to { "store" : "yes",
"term_vector" : "with_positions_offsets" }.
It is worth noting that both the hits have the same value of score but it
seems as it was guarantied that if _all is not stored and with no
term_vector then the order of those two documents is reversed.

Regards,
Lukas


(Lukáš Vlček) #3

Good to know that.
I do not bother much about this, just noticed that.

Thanks,
Lukas

On Wed, Jul 21, 2010 at 7:41 PM, Shay Banon shay.banon@elasticsearch.comwrote:

If they have the same score, then the order depends on several factors
internal to how Lucene works. Not really sure why you care.

On Wed, Jul 21, 2010 at 4:23 PM, Lukáš Vlček lukas.vlcek@gmail.comwrote:

Hi,

May be it is just a random observation but I noticed interesting
situation. I am running one server node with index having 4 shards (no
replicas). Now, when I index data and issue a query like "+term1 term2" then
I get some hits back. I noticed that two hits (out of the ten most relevant
hits) switched positions if I changed mapping for "_all" to { "store" :
"yes", "term_vector" : "with_positions_offsets" }.
It is worth noting that both the hits have the same value of score but it
seems as it was guarantied that if _all is not stored and with no
term_vector then the order of those two documents is reversed.

Regards,
Lukas


(system) #4