Pittsburgh-NEH-Institute / pr-app

eXist-db app development
MIT License
3 stars 1 forks source link

Learn about facets and fields in eXist-db #7

Closed djbpitt closed 2 years ago

djbpitt commented 2 years ago

Your to-do

djbpitt commented 2 years ago

Separate configuration file to specify facets and fields?

djbpitt commented 2 years ago

@gabikeane I'm somewhat impeded pending a conversation with you about how to use facets and fields. A few thoughts:

Before we implement facts or fields we need to identify how we plan to use them, that is, which facet or field index entries we'll create, and why, and how users will interact with them. When I look at Hammersmith Times 1804, for example, I see a lot of <placeName> elements with @ref attributes, but some of the @ref attributes begin with hash marks and others don't (both #whitehartpub and whitehartpub appear), and I don't know what (if anything) what they point to. Some of the @ref values match @xml:id values in places.xml, but others don't. More generally, I'm not confident that we have enough markup to construct a natural context that might use facets or fields.

djbpitt commented 2 years ago

@gabikeane I'm completed a first version of the facets portion of the tutorial. I'll start next to work on the fields portion, but in the meanwhile, could you please check out the facets portion and let me know whether you'd recommend any changes? Once you've done that, I'll ask someone else (Cliff? Joe?) to take a look, but I thought that you and I should take it as far as we can on our own before we impose on someone else.

djbpitt commented 2 years ago

@djbpitt Facets documentation:

  1. Add information and example for querying with facet selections.
  2. Add actual example from pr-app.
djbpitt commented 2 years ago

djb consultation with shea higgins about advanced search ux

2022-05-04

Checking and unchecking (general)

The text search selects only non-zero facets, so sidebar options change according to text content. Nothing else should change the inventory of sidebar options, although other actions do change the appearance of those options (checked or unchecked, etc.), and other actions do change the content of the main panel, that is, the articles in the articles list.

Update facet value counts in sync with selections in other facet. Alternative: fraction, e.g., 1/8 for one matching hit out of 8 total in corpus. Update both same and other facet.

Checking and unchecking for dates

Decade checkbox has three states: checked, unchecked, and dash.

Checking decade should open and check all months.

Checking individual month should render dash in decade box, which changes to check only when all months are selected. Unchecking month unchecks all decades and closes. This means that some but not all month checks implies hyphen in decade box. See:

Unchecked decade is compatible only with no checks in months below.

All months checked means decade automatically checked.

Layout

The width of sidebar the sidebar should be stable, so that it doesn't change with wider or narrower facet values. Fix to width of largest possible content item? Or allow very long items to wrap? In any case, fix hanging indent in facet values lists.

In any case, keep the main content in a stable location.

Center headings above facet categories and articles list.

Should entire page reload (it does on Amazon), or AJAX only results list panel?

Reload entire page if we can do it without FOUC. Otherwise change in place only the parts that need to change.

djbpitt commented 2 years ago

See https://www.algolia.com/blog/ux/filters-vs-facets-in-site-search/

djbpitt commented 2 years ago