Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a user, I want to select 1 or more filters to facet search results #119

Open
jordanpadams opened this issue Nov 8, 2024 · 2 comments
Assignees
Labels
B15.1 i&t.skip Skip I&T of this task/ticket p.must-have requirement the current issue is a requirement sprint-backlog

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Nov 8, 2024

💡 Description

From the initial designs, it was not entirely clear how to implement multi-select faceting. Need improved, detailed workflows for this.

Engineering Details

Generally, the idea for the multi-select faceting is when one value of a particular facet type is selected, that facet type list is "frozen". The counts associated with the values in the list may change, but the values in the list remain constant in order to allow for multi-select.

Key principles:

  • The page type facet field should NOT be multi-select (new development) - page types have pretty clear delineations where when a user selects one, sending them down that path makes sense
  • All other facet fields are multi-select.
  • For all multi-select facet fields, once 1 value within a facet field is selected, the values within that category are "frozen" until all values are deselected. Whenever a facet field is "frozen", the values displayed for that facet field do not change, only the number of results returned change. In the event there are no available results for a "frozen" facet field value, this is indicated with a (0) displaying next to the facet field value.
  • When a facet field value is selected, all other non-frozen facet fields dynamically update the displayed results to only reflect those containing results (>0).

Success Criteria

The following scenarios walk through a few examples of utilizing the multi-select faceting feature. We will ignore the page type facet field for the time being since it is fairly straightforward how that applies. Shorthand/abbreviations for the queries and names below for simplicity. Use LIDs and the full names in the implementation.

Scenario 1

  1. Select facet_field investigation = MSL (investigations selected = MSL)
  • frozen_facet_fields = investigation
  • to_filter_facet_fields = page_type, instrument, target
  • query solr = fq=ref_investigation:msl
  • investigation facet_field remains fully populated, with msl (167) and the rest have name (0)
  • instrument facet_field only contains values associated with MSL
  • target facet_field only contains values associated with MSL
  • page_type facet_field only contains values associated with ref_investigation:MSL
  1. Select facet_field investigation = M2020 (investigations selected = MSL, Mars 2020)
  • frozen_facet_fields = investigation
  • to_filter_facet_fields = page_type, instrument, target
  • query solr = fq=ref_investigation:msl OR ref_investigation:m2020
  • investigation facet_field remains fully populated, with msl (167) and mars2020 (197) and the rest have name (0)`
  • instrument facet_field only contains values associated with MSL or Mars 2020
  • target facet_field only contains values associated with MSL or Mars 2020
  • page_type facet_field only contains values associated with ref_investigation:MSL or ref_investigation:Mars2020
  1. Select facet_field instrument = mars2020.sherloc (investigations selected = msl, mars2020; instruments selected = mars2020.sherloc)
  • frozen_facet_fields = investigation, instrument
  • to_filter_facet_fields = page_type, instrument, target
  • query solr = fq=ref_investigation:msl OR ref_investigation:m2020&fq=ref_instrument=mars2020.sherloc
  • investigation facet_field remains fully populated, with msl (167) and mars2020 (197) and the rest have name (0)`
  • instrument facet_field contains only instruments associated with msl and mars2020. mars2020.sherloc is selected, with mars2020.sherloc (25)
  • target facet_field only contains values associated with ((msl OR mars2020) AND mars2020.sherloc)
  • page_type facet_field only contains values associated with ((ref_investigation:MSL OR ref_investigation:Mars2020) AND ref_instrument:mars2020.ecam)
  1. Select facet_field instrument = msl.chemcam (investigations selected = msl, mars2020; instruments selected = mars2020.sherloc, msl.chemcam)
  • frozen_facet_fields = investigation, instrument
  • to_filter_facet_fields = page_type, target
  • query solr = fq=ref_investigation:msl OR ref_investigation:m2020&fq=ref_instrument=mars2020.sherloc OR ref_instrument=msl.chemcam
  • investigation facet_field remains fully populated, with msl (167) and mars2020 (197) and the rest have name (0)`
  • instrument facet_field contains only instruments associated with msl and mars2020. mars2020.sherloc is selected with mars2020.sherloc (25) and msl.chemcam (20)
  • target facet_field only contains values associated with ((msl OR mars2020) AND (mars2020.sherloc or msl.chemcam))
  • page_type facet_field only contains values associated with ((ref_investigation:MSL OR ref_investigation:Mars2020) AND (ref_instrument:mars2020.ecam or ref_instrument:msl.chemcam))

Additional Information

Other key principles to keep in mind when implementing faceting (from ChatGPT):

  1. User-Friendly Interface
    • Clear Labels and Organization: Use clear and intuitive labels for facets and organize them logically (e.g., grouping related facets together).
    • Multi-Select Capability: Allow users to select multiple values within the same facet (e.g., selecting both "Red" and "Blue" under the "Color" facet).
    • Checkboxes for Selections: Use checkboxes or toggles for selecting multiple options, making it obvious that users can select more than one.
    • Search Within Facets: If there are many options within a facet, provide a search bar to quickly filter facet values.
    • Faceted Search Preview: Show the number of results for each facet value (e.g., "Brand A (24)"), allowing users to see the impact of their selection before applying it.
  2. Dynamic Facet Updates
    • Real-Time Filtering: Update the results and available facet options in real-time as users make selections, ensuring a smooth and responsive experience.
    • Adaptive Facets: Dynamically adjust the availability of facet options based on current selections to prevent dead ends (e.g., disabling or hiding facet values that have zero results).
    • Breadth-First Approach: Consider showing all facet values initially but indicate which have results (or fade out options with zero results) to guide user choices.
  3. Performance Optimization
    • Indexing and Caching: Use efficient indexing (like Elasticsearch or Solr) and caching mechanisms to speed up search queries, especially for large datasets.
    • Lazy Loading Facets: Load only the most relevant facets initially, and use lazy loading for additional facets or options when needed.
    • Debounced Queries: When implementing search-as-you-type within facets, use debounced queries to reduce the number of server requests.
  4. Logical Operators
    • AND vs. OR Behavior: Clearly define how selections within and across facets work:
    o Within a Facet: Use an OR operation (e.g., selecting "Red" and "Blue" in "Color" should show items that are either Red OR Blue).
    o Across Facets: Use an AND operation (e.g., selecting "Red" in "Color" and "Cotton" in "Material" should show items that are both Red AND Cotton).
    • Negation Options: Consider allowing users to exclude certain values (e.g., "Not Blue"), which can be useful for narrowing down results.
  5. Clear Visual Feedback
    • Selected Facet Indicators: Clearly show which facets are active, using highlights, bold text, or different background colors.
    • Removable Facet Chips: Display selected facets as removable chips or tags at the top of the search results, allowing users to quickly deselect them.
    • Reset Option: Provide a "Clear All" button to reset all facet selections easily.
  6. Scalability and Flexibility
    • Scalable Data Models: Ensure that the database or search engine is designed to handle large volumes of data and complex queries.
    • Configurable Facets: Allow admins to configure which facets are displayed, their order, and their default behavior (e.g., collapsed vs. expanded).
    • Prioritization of Facets: Highlight the most relevant or popular facets based on user behavior or business priorities.
  7. Mobile and Accessibility Considerations
    • Responsive Design: Ensure the facet panel is responsive and optimized for different screen sizes. On mobile, consider using collapsible sections or sliding panels.
    • Keyboard and Screen Reader Support: Implement keyboard navigation and screen reader support to ensure the faceted search is accessible to users with disabilities.
  8. Analytics and Continuous Improvement
    • Track User Interactions: Capture analytics on how users interact with facets (e.g., which facets are most used) to refine the experience over time.
    • A/B Testing: Experiment with different facet arrangements, labels, or behaviors to determine what works best for your audience.
    • Feedback Mechanism: Provide a way for users to give feedback if they can't find what they're looking for, which can help identify gaps in the facet options.
    By following these principles, you can build a robust and intuitive multi-select faceted search that enhances the user experience, drives engagement, and improves findability.
@jordanpadams jordanpadams added enhancement New feature or request B15.1 task i&t.skip Skip I&T of this task/ticket labels Nov 8, 2024
@jordanpadams jordanpadams self-assigned this Nov 8, 2024
@jordanpadams jordanpadams changed the title Create example workflows and designs for implementing faceting As a user, I want to select 1 or more filters to facet search results Nov 8, 2024
@jordanpadams jordanpadams added requirement the current issue is a requirement and removed enhancement New feature or request labels Nov 8, 2024
@jordanpadams jordanpadams transferred this issue from NASA-PDS/web-modernization Nov 8, 2024
@jordanpadams
Copy link
Member Author

@edwardbarraza @eddiesarevalo can you review my success criteria scenario above and let me know if that makes any sense?

@jordanpadams
Copy link
Member Author

I can add additional scenarios if needed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B15.1 i&t.skip Skip I&T of this task/ticket p.must-have requirement the current issue is a requirement sprint-backlog
Projects
Status: Sprint Backlog
Development

No branches or pull requests

2 participants