Skip to main content
Skip table of contents

Search in multiple BCS

It's possible to use indexes from different BUS Index Task in one search request i.e. search in multiple BCS in one request to service. This technique based on Elastic Search aliases: all requested indexes should be added into one alias and this alias is used for searching.


To add multiple indexes into one alias use followed command

JAVA
curl -X POST "localhost:9200/_aliases?pretty" -H 'Content-Type: application/json' -d'
{
    "actions" : [
        { "add" : { "index" : "index0", "alias" : "aliasforsearching" } },
        { "add" : { "index" : "index1", "alias" : "aliasforsearching" } }
    ]
}


To remove index from alias use followed command

JAVA
curl -X POST "localhost:9200/_aliases?pretty" -H 'Content-Type: application/json' -d'
{
    "actions" : [
        { "remove" : { "index" : "index0", "alias" : "aliasforsearching" } },
    ]
}


  • "add" and "remove" commands can be combined in one request in any combinations
  • Removing index from alias doesn't delete index. Removed index can be used with another aliases, requests etc.


To use new created alias for searching enter alias name into BUS Index Task configuration for ElasticIndex module. See ElasticIndex module configuration for BUS Intex Task in BCSTechManual for details

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.