majlis-erc / srophe

Srophé Application. A TEI publishing application.
GNU General Public License v3.0
0 stars 0 forks source link

Faceted Search #10

Closed mMoliere closed 1 year ago

mMoliere commented 1 year ago

@wsalesky We would like a faceted search for our Srophé app. There is an example where this has been executed really well: https://www.e-codices.unifr.ch/en/search/?aSelectedFacets=&sQueryString=&sSearchField=fullText&iResultsPerPage=20&sSortField=score

We could provide the labels and paths for the facets.

wsalesky commented 1 year ago

@mMoliere yes, please give me a list of labels and xpaths and I will get that up and running.

mMoliere commented 1 year ago

@wsalesky

Library /TEI/text/body/listBibl/msDesc/msIdentifier/repository Country /TEI/text/body/listBibl/msDesc/msIdentifier/country City /TEI/text/body/listBibl/msDesc/msIdentifier/settlement Language /TEI/text/body/listBibl/msDesc/msContents/msItem/textLang Material /TEI/text/body/listBibl/msDesc/physDesc/objectDesc/supportDesc/support/material Date of Origin /TEI/text/body/listBibl/msDesc/physDesc/objectDesc/supportDesc/support/origDate Place of Origin /TEI/text/body/listBibl/msDesc/physDesc/objectDesc/supportDesc/support/origPlace Type of manuscript /TEI/text/body/listBibl/msDesc/physDesc/ab/@subtype Script type /TEI/text/body/listBibl/msDesc/physDesc/scriptDesc/scriptNote/@script Script mode /TEI/text/body/listBibl/msDesc/physDesc/scriptDesc/scriptNote/@rend Script quality /TEI/text/body/listBibl/msDesc/physDesc/scriptDesc/scriptNote/@style Binding /TEI/text/body/listBibl/msDesc/physDesc/bindingDesc/binding/decoNote/objectType Incodicated document /TEI/text/body/listBibl/msDesc/physDesc/additions/list/item/objectType Reproductions (2 options, "Yes/No" that indicate if this element exists) /TEI/facsimile/graphic

wsalesky commented 1 year ago

Added. Styling can wait until we hear back from the designers. You can see the facets by going to the manuscript browse page.

mMoliere commented 1 year ago

That works really well!

Though I would expect to see Country and City as well in the list.

wsalesky commented 1 year ago

@mMoliere Yes, it is in the data, let me troubleshoot and get back to you.

As an FYI, this is where facets are configured: https://github.com/majlis-erc/srophe/blob/master/manuscripts/facet-def.xml

As long as it is a straightforward xpath, it is easy for anyone to add a new facet. Just add it to the facet-def.xml file and then run a re-index of the collection, by going to the /build-index.html page.

wsalesky commented 1 year ago

@mMoliere There was a typo in the facet xpath. Country and City are now displaying as expected.

mMoliere commented 1 year ago

@wsalesky Yes, that did it!

Now, I see that the list is already quite crowded and it will eventually become unwieldy. Can you put the values for the individual facets into collapsibles (I know that this is becoming a theme …) There is an example that works really well: https://www.e-codices.unifr.ch/en/search/?aSelectedFacets=&sQueryString=&sSearchField=fullText&iResultsPerPage=20&sSortField=score

mMoliere commented 1 year ago

@wsalesky I just noticed that the faceted search bar creates an error message in the browse pages of the other entity types. This is what it says in "Works":

Image

wsalesky commented 1 year ago

Bug is fixed. I still need to change the styling.

mMoliere commented 1 year ago

Thank you!