ComplexSearch

I have created ElasticSearch index with following mapping. I need to write Complex Search query like find relevant Items on query result. Ex.Find item having price= "100". Get ItemBrand from search result and then find other items having same ItemBrand.(Similar products). Can anyone help me out?

PUT myindex-solvisoft2
{
"mappings": {
"ItemCategory":{
"properties": {Category":{"type": "text"},"IsActive":{"type": "boolean"},"Comment":{"type": "text" }}
},

"ItemBrand": {
"properties": {"Creator": {"type": "keyword"},"DateEffective": {"type": "date"},"DateTerminated": {"type": "date"},"Description": {"type": "text"},
"IsActive": {"type": "boolean"},"ItemBrand": {"type": "keyword"}}
},

"Item": {
"properties": {
"Comment": {"type": "text"},"Creator": {"type": "keyword"},"DateEffective": {"type": "date"},
"DateTerminated": {"type": "date"},"IsActive": {"type": "boolean"},"ItemBrand": {"type": "keyword" },
"ItemDescription": { "type": "text" },"ItemCategory": {"type": "keyword"},"ItemId": {"type": "integer" },
"Price": {"type": "double" } }
}
}
}

Some what like this => Select * from Item where ItemBrand in (Select ItemBrand from Item where Price = 100 )

Just do a filter on the price field, then it will return the same thing.

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