Hi,
i have problem with facets. I have documents with user field. In
documents is user "vrtak-cz". I use this field as facet (field term).
ES split this user in facets to 1. "vrtak" 2. "cz"
example data
https://gist.github.com/9bd1e1bc4bf289a576cc
Hi,
i have problem with facets. I have documents with user field. In
documents is user "vrtak-cz". I use this field as facet (field term).
ES split this user in facets to 1. "vrtak" 2. "cz"
example data
https://gist.github.com/9bd1e1bc4bf289a576cc
Define a mapping for this field.
I use a keyword analyzer for the same use case.
HTH
David ![]()
@dadoonet
Le 10 déc. 2011 à 06:05, Patrik Votoček patrik@votocek.cz a écrit :
Hi,
i have problem with facets. I have documents with user field. In
documents is user "vrtak-cz". I use this field as facet (field term).ES split this user in facets to 1. "vrtak" 2. "cz"
example data
https://gist.github.com/9bd1e1bc4bf289a576cc
I'm newbe in ES world.
So how do i setup differend mapping for this field? How to say use whole
string?
I found it 
https://gist.github.com/9bd1e1bc4bf289a576cc#file_solution.json
So is it possible set mapping after documents in index?
No. You have to define the mapping for a document type before you send the first doc.
Hth
David ![]()
@dadoonet
Le 11 déc. 2011 à 05:54, Patrik Votoček patrik@votocek.cz a écrit :
I found it
https://gist.github.com/9bd1e1bc4bf289a576cc#file_solution.json
So is it possible set mapping after documents in index?
Another possibly simpler solution is just to mark the field in the mapping
with index set to not_analyzed (which is the same as using keyword
analyzed). Note, in the same, make sure the analyzer is set to that, not
just the index_analyzer. And as David pointed out, you will have to set the
mapping when you create the index, and then index the data.
On Sun, Dec 11, 2011 at 8:53 AM, David Pilato david@pilato.fr wrote:
No. You have to define the mapping for a document type before you send the
first doc.Hth
David
@dadoonetLe 11 déc. 2011 à 05:54, Patrik Votoček patrik@votocek.cz a écrit :
I found it
https://gist.github.com/9bd1e1bc4bf289a576cc#file_solution.json
So is it possible set mapping after documents in index?
© 2020. All Rights Reserved - Elasticsearch
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.