[custom_score] query does not support [facets]

Been up way too late trying to get this to work to no avail. Is there a way
to get facets AND the custom_score to work?

Context: I'm trying to personalise ranking, and products in a very fine
grained manner. The user should be able to facet on size while still having
the personalised ranking applied. Take a look at goodguide.com to get an
idea for what I'm attempting.

Or should i be using boost somehow? I guess I could set a flag for each of
the personalised filters, and do a boost it the index value matchs the
saved user preference value.

Thanks in advance (as always!) for any help,

{

"query":{

  "custom_score":{

     "params":{

        "p":0

     },

     "script":"_score * p",

     "query":{

        "filtered":{

           "filter":{

              "fquery":{

                 "query":{

                    "query_string":{

                       "query":"django_ct:(app_name.modelone 

OR app_name.modeltwo)"

                    }

                 },

                 "_cache":true

              }

           },

           "query":{

              "query_string":{

                 "query":"(red)",

                 "default_operator":"AND",

                 "default_field":"text",

                 "auto_generate_phrase_queries":true,

                 "analyze_wildcard":true

              }

           }

        }

     },

     "facets":{

        "size_exact":{

           "terms":{

              "field":"size_exact",

              "size":100

           }

        }

     },

     "from":0,

     "size":30

  }

}

}

--
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.

On Jun 11, 2013, at 13:26 , Nathan Keller its@madteckhead.com wrote:

Been up way too late trying to get this to work to no avail. Is there a way to get facets AND the custom_score to work?

Hi Nathan,

You've nested facets and other search properties below the query. They should be at the "root" of your search request object, like so:

{
"query": { … },
"facets": {
"size_exact": {
"terms": {
"field": "size_exact",
"size": 100
}
}
},
"from": 0,
"size": 30
}

Hope this helps! :slight_smile:

Regards,

Alex Brasetvik

Found AS
Hosted Elasticsearch – www.found.no – @foundsays

--
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.