Yes.
POST /faq_comp1/_doc
{
"company": "1",
"content": "foo bar"
}
POST /faq_comp2/_doc
{
"company": "2",
"content": "foo bar"
}
Then
# Get all from company 1
GET /faq_comp1/_search
# Get all from company 1
GET /faq_comp2/_search
# Get all from all companies
GET /_search
Is that what you are asking for?
You can also look at aliases and filtered aliases and do something like:
POST /faq/_doc
{
"company": "1",
"content": "foo bar"
}
POST /faq/_doc
{
"company": "2",
"content": "foo bar"
}
If you create an alias faq_comp1
which filters on "company": "1"
and another one for the second company, you will be able to run:
# Get all from company 1
GET /faq_comp1/_search
# Get all from company 1
GET /faq_comp2/_search
# Get all from all companies
GET /_search
If you want to secure all that, you can secure you indices and your aliases with the built-in security.