Ivan, I think I reply to author instead to all. Sorry On Wednesday, June 11, 2014 3:40:41 PM UTC-6, Ivan Brusic wrote: > > Can you provide an example where you apply a filter? > > Keep in mind that if you are using the post filter (the 'filter' in your > example), then the facets will not be affected by the filter. You must > either use a filtered query or use the facet filters. > > > http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-post-filter.html#search-request-post-filter > > -- > Ivan > > > On Wed, Jun 11, 2014 at 2:31 PM, Misha Tatinets <[email protected] > <javascript:>> wrote: > >> Hi Karel, >> Thanks for replying. >> >> What I mean by "facets aren't working", that I can't to filter my results. >> >> When I submit query I see in my log next : >> curl -X GET 'http://localhost:9200/companies/company/_search?pretty' -d >> '{"query":{"bool":{"should":[{"multi_match":{"query":"3m","fields":["name"],"operator":"and"}}]}},"filter":{},"facets":{"categories":{"terms":{"field":" >> categories.name >> "},"facet_filter":{}},"made_in_usa":{"terms":{"field":"made_in_usa"},"facet_filter":{}}}}' >> >> >> That gives me list of the records. >> >> But when I try filter results, nothing is happening. Line in the log are >> identical, although rails log shows me that params "c" and "query" are >> passing through. Url also reflecting that params submitted. That where I am >> stuck. >> >> My assumption that this is more rails part issue than ES, but I try to >> use your template and I don't understand what I am missing. >> >> Could you please give more direction how I can fix it or more examples so >> I will find my error. I would appreciate any type of your help. >> >> Thank you so much Karel. >> >> >> On Wednesday, June 11, 2014 11:19:12 AM UTC-6, Karel Minařík wrote: >>> >>> >>> I'm getting results but facets aren't working >>>> >>> >>> Can you specify in a bit more detail how facet's "aren't working" (i.e. >>> what do you want to achieve, what is expected, etc)? Since you base your >>> code on the provided Rails templates, the code should be easily >>> translatable to your use case. >>> >>> Karel >>> >> -- >> 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 [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elasticsearch/53b804d4-d2c4-4b3e-b206-204a45c69043%40googlegroups.com >> >> <https://groups.google.com/d/msgid/elasticsearch/53b804d4-d2c4-4b3e-b206-204a45c69043%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > >
-- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/45e8900c-0fe8-4e94-a4d2-9a1c092408bb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
