I've provided some output below. The 4 instances of the term should be most
relevant, then the two, and one last. Yet this is not the case...
http://localhost:9200/test/type1/_search?pretty=true&q=cat:restaurants
{
"took" : 10,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 3,
"max_score" : 0.30685282,
"hits" : [ {
"_index" : "test",
"_type" : "type1",
"_id" : "doc2",
"_score" : 0.30685282, "_source" : {"cat": "restaurants restaurants restaurants restaurants"}
}, {
"_index" : "test",
"_type" : "type1",
"_id" : "doc3",
"_score" : 0.30685282, "_source" : {"cat": "restaurants"}
}, {
"_index" : "test",
"_type" : "type1",
"_id" : "doc1",
"_score" : 0.2712221, "_source" : {"cat": "restaurants restaurants"}
} ]
}
}
On Friday, September 7, 2012 1:11:52 PM UTC-4, Allison A. wrote:
I have a field "CategoryMajor"
I have two documents:
Doc 1: CategoryMajor: Restaurants
Doc 2: CategoryMajor: Restaurants, Restaurants, Restaurants, Restaurants,
Restaurants
If I search for CategoryMajor:Restaurants, then Doc #1 is more relevant
than Doc #2.
Why is this, and how do I remedy this?
Thanks,
Allison
--