Hello, Thank you for your response. Unfortunately this is not what I wanted.
'll Explain what I do, so maybe you can find a route different from the one I'm trying to take .. Should I build an autocomplete "smart" in the sense that for every result must be worn behind a series of information. For example: I am looking for "bologna" (my city) and I have to run a query (or more than one, I was looking for a way to make it as little as possible) where "bologna" is searched in the fields "name", "locality" and "region". If it is found, necessary to count how many structures there are in bologna (here you will understand why I was trying to use the facets). Obviously I could do this on the server side, for example with php with a loop, but the answer would be very slow and was frustrated all the speed of elasticsearch. At this point I wonder how I could do this. thanks 2014-02-13 20:51 GMT+01:00 Binh Ly <[email protected]>: > The closest you can probably get is to script and then sum (but you need > to know the exact terms you are querying up front). It could be slow if you > got lots of documents, but here is more information: > > > http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-advanced-scripting.html > > For example: > > POST _search > { > "script_fields": { > "locality_bologna": { > "script": "_index['locality']['bologna'].tf()" > } > } > } > > -- > You received this message because you are subscribed to a topic in the > Google Groups "elasticsearch" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/elasticsearch/hjODe_18d9o/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/5dc9cd99-b796-437d-be0e-06d78b8ee492%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- 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/CAJNwxOO5Mqho_FdKZ-TSdCiwj6Aanz-c6_fMdVSGx%2BEG6jYyQw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
