0

I am using logstash jdbc plugin to insert data from db to already created custom index in elastic search. I have some columns in the index which are analyzed using custom analyzers.

For example I am getting column1 from database which is not analyzed. I have created two columns column2 and column3 for which analyzers are applied while creating an index. Now I want the same data of column1 to be copied into column2 and column3 while the data is being inserted.

I am using the following pattern while creating index:

"mappings": {   
    "itemsnew": {   
        "properties": {   
            "column1": {  
                "type": "string",  
                "copy_to": "column2",   
                "copy_to": "column3"    
            },   
        "column2": {    
            "index_analyzer": "custom analyzer",   
            "search_analyzer": "standard",   
            "type": "string"   
        }    
    }    
}    

Will the data get inserted into the column2 and column3 and will it be analyzed ?

sri
  • 331
  • 1
  • 4
  • 11
  • What happens when you try? – Alain Collins Dec 14 '15 at 14:44
  • Since you're in control of the client, you might also look into mutlifields (so you can have myField.foo and myField.bar): https://www.elastic.co/guide/en/elasticsearch/reference/1.4/_multi_fields.html – Alain Collins Dec 14 '15 at 14:46
  • I have tried running this but I am not able to see the column2 and column3 as a columns displayed like column1. But when I am able to search data by selecting column2 and column3 in Structured query under match_all. 1) How to display the columns : column2 and column3 2) How to check if the data is getting analysed or not ? – sri Dec 14 '15 at 14:50

0 Answers0