Percolator Index Mapping


(Siddharth Gupta) #1

I am using elasticsearch 5.5 and want to create a percolator index with the following mapping :
{
"usqueriesfreqpercolators" : {
"mappings" : {
"queries" : {
"properties" : {
"query" : {
"type" : "percolator"
}
}
},
"docs" : {
"properties" : {
"content" : {
"type" : "text",
"analyzer" : "english"
}
}
}
}
}
}
However When I use the following command :
PUT /my-index
{
"mappings": {
"queries": {
"properties": {
"query": {
"type": "percolator"
}
}
},
"docs" : {
"properties" : {
"content" : {
"type" : "text",
"analyzer" : "english"
}
}
}

}

}

The resultant mapping is reverse of what I need :
{
"usqueriesfreqpercolators_test" : {
"mappings" : {
"docs" : {
"properties" : {
"content" : {
"type" : "text",
"analyzer" : "english"
}
}
},
"queries" : {
"properties" : {
"query" : {
"type" : "percolator"
}
}
}
}
}
}

Can anybody please help ?

Thanks & Regards,
Siddharth.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.