Faceting for full string


(Alexander Peregudov) #1

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.

JS lib:

Thank You!

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


(Clinton Gormley) #2

Hi Alexander

You can use multi_fields to index the same field in different ways:

  1. as {"index": "analyzed"} for search
  2. 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

On 25 October 2013 10:53, Alexander Peregudov <alexander.peregudov@gmail.com

wrote:

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.

JS lib:
https://github.com/okfn/facetview/blob/master/jquery.facetview.js

Thank You!

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

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


(system) #3