0
votes

I have the following documents in ElasticSearch 0.19.11, using:

{ "title": "dogs species",
    "col_names": [ "name", "description", "country_of_origin" ],
    "rows": [
        { "row": [ "Boxer", "good dog", "Germany" ] },
        { "row": [ "Irish Setter", "great dog", "Ireland" ] }
    ]
}
{ "title": "Misc stuff",
    "col_names": [ "foo" ],
    "rows": [
        { "row":    [ "Setter is impotant" ] },
        { "row":     [ "Ireland is green" ] }
    ]
}

The mapping is as follows:

{
    "table" : {
        "properties" : {
            "title" : {"type" : "string"},
            "col_names" : {"type" : "string"},
            "rows" : {
                "properties" : {
                    "row" : {"type" : "string"}
                }
            }
        }
    }
}

Question: I'm now searching for "Ireland Setter" and I need to have a higher score for documents that have search terms in the same row.

Currently the second document gets score of 0.22, while the first one - 0.14.

I want the first document to get a higher score in this case, since it has both "Ireland" and "Setter" in the same row. How can it be done?

1

1 Answers

1
votes

With great cooperation from ElasticSearch google-group members, the solution is found. Here is the link to the discussion: https://groups.google.com/forum/?fromgroups#!topic/elasticsearch/4O9dff2SNhg