Example:
I have the a CSV log with user queries. Fields are:
State
Query
This CSV was indexed by Logstash with CSV plugin into ES index. I'm using
Facetview https://github.com/okfn/facetview/ JS library to view results.
But Facetview use terms, not string. So, I can see
"iPhone", "4", "4g", "5" for Query filed column
and "North", "South', "Carolina" for State field column
as separate results in facet.
Is it possible to do facet for full exact string and see "iPhone
4", "iPhone 4g", "iPhone 5" for Query field and "North Carolina", "South
Carolina" for State field.
You can use multi_fields to index the same field in different ways:
as {"index": "analyzed"} for search
as {"index": "not_analyzed"} for faceting / sorting
Note: faceting on string fields can be very memory intensive. You don't
want to do this on high cardinality fields as it is likely that you will
run out memory as your dataset grows
Example:
I have the a CSV log with user queries. Fields are:
State
Query
This CSV was indexed by Logstash with CSV plugin into ES index. I'm using
Facetview GitHub - okfn/facetview: FacetView is a pure javascript frontend for ElasticSearch. JS library to view results.
But Facetview use terms, not string. So, I can see
"iPhone", "4", "4g", "5" for Query filed column
and "North", "South', "Carolina" for State field column
as separate results in facet.
Is it possible to do facet for full exact string and see "iPhone
4", "iPhone 4g", "iPhone 5" for Query field and "North Carolina", "South
Carolina" for State field.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.