This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If the term facet contains "fields" : [ "field1", "field2", ... ] | |
instead of just "field" : "field_name" then the individual counts for | |
each field are grouped under that one facet's name. But otherwise, there | |
is no combining and grouping. For instance, there are no counts of | |
(married and female). A combination of a script and some form of | |
post-processing is needed for this. | |
My inspiration for the solution came | |
from http://elasticsearch-users.115913.n3.nabble.com/facet-and-grouping-td4020055.html | |
(specifically, Sujoy's comment). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This started out as a simple Python 3 script that reads the 8-bit binary | |
string form of one or more bytes, assumes they are a UTF-8 sequence, and | |
prints the resulting string. It now can go both ways, converting robot | |
into human, and also converting human back into robot. | |
To get a copy of the files in this Gist via git, go to the directory | |
into which you'd prefer to place the robot subdirectory tree that | |
contains the git repository. Then: | |
$ git clone https://gist.github.com/32d92f7a7ee13761f711.git robot |