Comments (3)
Hi @Patrick386 ,
Sorry for late reaction.
The recommended way to do it is to use the filters value of the SearchState
.
Your code should look as follows:
HitsSearcher hitsSearcher = HitsSearcher.create(
applicationID: AlgoliaCredentials.applicationID,
apiKey: AlgoliaCredentials.apiKey,
state: const SearchState(
indexName: 'company',
filters: 'published:true AND status:processing',
//query: '',
));
Otherwise you can use the FilterState component connected to your HitsSearcher
instance, which simplified the filter management.
from algoliasearch-helper-flutter.
@VladislavFitz the filters param in not there in SearchState
from algoliasearch-helper-flutter.
Hi @Patrick386 , Sorry for late reaction. The recommended way to do it is to use the filters value of the
SearchState
. Your code should look as follows:HitsSearcher hitsSearcher = HitsSearcher.create( applicationID: AlgoliaCredentials.applicationID, apiKey: AlgoliaCredentials.apiKey, state: const SearchState( indexName: 'company', filters: 'published:true AND status:processing', //query: '', ));Otherwise you can use the FilterState component connected to your
HitsSearcher
instance, which simplified the filter management.
Thank you for your answer.
By the way, the following code is the one I am currently using.
final FilterState filterState = FilterState()
..add(mainCategoryGroupID, [Filter.facet('mainCategory', category.main)])
..add(subCategoryGroupID, [])
..add(typeGroupID, [])
..add(tagGroupID, []);
HitsSearcher hitsSearcher = HitsSearcher(
applicationID: AlgoliaCredentials.applicationID,
apiKey: AlgoliaCredentials.apiKey,
indexName: AlgoliaCredentials.discoveryIndex,
)..connectFilterState(filterState);
I will try applying the recommended code. Thank you for your helpful response.
from algoliasearch-helper-flutter.
Related Issues (20)
- Local Cache Feature HOT 1
- FacetList.eventTracker.clickedFilters throws 422 syntax error HOT 1
- Toggle 2 facets with forEach doesn't listen both changes HOT 1
- Simple Filtering Question HOT 1
- Support algolia version 1.0.0 HOT 2
- 'demo_ecommerce' data search error: Method not allowed with this API key HOT 2
- Starter Code in Algolia's Getting started with Flutter Helper Documentation throws an exception
- There's an issue with fetching data for the next page. HOT 2
- HitSearcher is fetching data from Algolia already when just initially adding a stream listener HOT 1
- when the facetlist has not and EventTracker breaks the FaceList usage HOT 1
- Help filtering by array HOT 1
- Selected Facet value is not applied to search filter after toggling another Facet
- Getting QueryID for events HOT 4
- Algolia Timeout Exception HOT 2
- V1.0.0 TypeError: null: type 'Null' is not a subtype of type 'String' HOT 1
- DataTable pagination?
- Hi @VladislavFitz Still facing same issue HOT 2
- Unhandled Exception: FileSystemException: Creation failed, path = 'algolia' (OS Error: Read-only file system, errno = 30) HOT 8
- Rerun of the search request HOT 4
- Dependency Conflict with `algolia_helper` and `http` in `algolia_helper_flutter` HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algoliasearch-helper-flutter.