Comments (5)
@tfrancart thanks for a feedback!
Returning the complete list of values even if the doc_count is 0 might be a good feature as a new configuration option. Feel free to make a PR.
Right now workaround like triggering an empty search to get all filters seems best
from itemsjs.
Hi, thanks for the answer. Unfortunately I don't have the Javascript skills nor the bandwith to contribute directly to the code.
Maybe you could point to the exact place in lib.js where the modification should take place ?
I'd be also happy to test any improvement, and contribute to documentation on that new parameter.
from itemsjs.
This .buckets
function is responsible for returning values in filters behavior:
Line 277 in f19850f
Please let's try conjunction: false
in filters as in example (https://github.com/itemsapi/itemsjs/blob/master/docs/configuration.md). Probably that is what you are looking for.
from itemsjs.
Thanks for coming back to me on this
Please let's try conjunction: false in filters as in example (https://github.com/itemsapi/itemsjs/blob/master/docs/configuration.md). Probably that is what you are looking for.
This is not quite what I am looking for. With conjunction: false
, I always get the same values in the aggregation, with the same doc_count, independantly of the current result set. I think this really means : "this facet should be interpreted as an OR, so the user should be able to select multiple values from it, including values that are outside of the current result set, so let's always return the complete list of values, with total doc_count".
I need the same thing, but with the doc_count
updated with respect to the current result set. I don't know if this could be an update of the existing conjunction: false
flag, or if this requires a separate option.
from itemsjs.
Hey @tfrancart, this issue has been resolved in the new version 2.0.0. All filters are listed now even if positive number or 0. You can test it out here https://jsfiddle.net/cigol/0ef9qeos/181.
If that's still not working properly please reopen
from itemsjs.
Related Issues (20)
- leaflet map integration HOT 1
- Add Typescript types HOT 8
- Asking for help, search nested objects HOT 4
- Improvement request : buckets sort HOT 2
- [Feature Request] Support both conjunctions in aggregations HOT 4
- bug with selected value for boolean facet HOT 3
- Is there an adapter for redissearch HOT 1
- Need for several search comparaison operators HOT 4
- [Question] How can I get the elements of an aggregation into a list? HOT 1
- [Question] What is the right way to import itemsjs in Vue3 HOT 1
- [Feature Request] A 'better than' filter logic on tags. HOT 1
- Date range text boxes HOT 7
- TypeError: Cannot read properties of undefined (reading 'words') HOT 2
- Ranges...? HOT 1
- Fuzzy search / prefix match? HOT 3
- Place null values last when sorting HOT 1
- searchableFields does not work well if array items contain dashes or spaces HOT 2
- Why does checkbox work to filter, but drop down box does not? HOT 1
- Persistence of index HOT 1
- No SearchOptions field "ids" for disabled native search?
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 itemsjs.