Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Partner
Partner

Mashup custom search problem (selectAssociations limit)

Hello everyone,

I've built a mashup with a custom search function using Capability API. I'm using the searchResults and selectAssociations methods. My mashup works perfectly fine with 8 - 10 search items.

However, when I select 11 or more items, for example 11 stores (store 1, store 2, ...., store 11), the selection doesn't work. The error that I receive in Chrome dev console is this:
code: 15000, parameter: "Search query took to long", message: "Search timeout".

It seems that selectAssociations has a search limit.

Is there something I can do to optimize the response time or to bypass the limit, if the limit exists?

1 Solution

Accepted Solutions
Employee
Employee

Re: Mashup custom search problem (selectAssociations limit)

Hi @gabineaq,

This is a known issue, the smart search team have been contacted and will deal with by either documenting a limitation or fix it.

A possible workaround will be to split the array of search terms in 2 or more arrays then chain the selectAssociations calls

const searchTermsPart1 = ['store1','store2','store3','store4'];
const searchTermsPart2 = ['store5','store6','store7','store8'];
app.selectAssociations( 0, searchTermsPart1 ).then(()=>{
  app.selectAssociations( 0, searchTermsPart2 );
});
// nicer if used with async await

I hope this helps,

 

 

View solution in original post

2 Replies
Employee
Employee

Re: Mashup custom search problem (selectAssociations limit)

Hi @gabineaq,

This is a known issue, the smart search team have been contacted and will deal with by either documenting a limitation or fix it.

A possible workaround will be to split the array of search terms in 2 or more arrays then chain the selectAssociations calls

const searchTermsPart1 = ['store1','store2','store3','store4'];
const searchTermsPart2 = ['store5','store6','store7','store8'];
app.selectAssociations( 0, searchTermsPart1 ).then(()=>{
  app.selectAssociations( 0, searchTermsPart2 );
});
// nicer if used with async await

I hope this helps,

 

 

View solution in original post

Partner
Partner

Re: Mashup custom search problem (selectAssociations limit)

Hi @aaz,

Thanks for the reply. It's really useful.

I'll try to chain the selectAssociations calls and check how the search performs.