question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to add global filter in config?

See original GitHub issue

How to add global filter in config?

https://docs.elastic.co/search-ui/api/core/configuration#filters-global-filters

The docs mention global filters, but doesn’t mention how. It just shows the filters object. I can add filters fine in the searchQuery object, that works great, but I believe that isn’t what is meant with global filters?

I’m asking because I’m looking for a way to add predefined filters for both onSearch results and onAutocomplete suggestions.

I am using the elasticsearch connector

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Mites88commented, Oct 31, 2022

I totally missed that from your original post.

Unfortunately I can’t help with that one. Will be watching this thread.

1reaction
Mites88commented, Oct 31, 2022

You put it on searchQuery property in config object, ie

    searchQuery: {
      ...otherOpts,
      filters: [
        { field: 'places.keyword', type: 'any', values: ['Italy'] },
      ],
    }
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add global ASP.Net Web Api Filters? - Stack Overflow
Short answer: MVC and Web API filters are not cross compatible, and if you want to register them globally, you must use the...
Read more >
6. Global Filters - Spring Cloud
This combined filter chain is sorted by the org.springframework.core.Ordered interface, which can be set by implementing the getOrder() method or by using the...
Read more >
Configuring the Global Filter - Documentation - SAPUI5 SDK
You configure the global filter in the "sap.ovp" section using the following properties: globalFilterModel : the OData model to use for the global...
Read more >
Configuring global filters - IBM
Using global filters removes the need to replicate filtering rules across multiple types and removes the need to create new filters for each...
Read more >
Add a Global Filter Panel Widget to Filter Data from the ...
The panel can contain single or multiple global filters. Use a global filter to apply the same filter to multiple queries in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found