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

2nd-level values of hierarchical facets are not always sorted according to their parent value #1697

Closed
pronguen opened this issue Feb 12, 2021 · 1 comment
Assignees
Labels
bug Breaks something but is not blocking f: search p-Medium Medium priority (to be solved within 1-2 years)

Comments

@pronguen
Copy link
Contributor

pronguen commented Feb 12, 2021

Describe the bug

A document can have a repetitive document type (main type + subtype). In this case, if it has 2 different main types, this generates a problem in the facet (see screenshot).

Example: a document has the following main types/subtypes: a/1 + b/2. If the main type a is selected in the facet, 1 is then proposed as sub-facet, but 2 is also proposed.

To Reproduce

  1. Create a document with two different main type, and two different subtypes
  2. Save it
  3. Do a search using the document type facet, and selecting one of the main type of this document.
  4. See the subtypes proposed

Expected behavior

2 should not be proposed as subfacet of a.

Context

Screenshots

"CD-Rom, DVD-Rom" belongs to the main type "Support électronique".
image

@pronguen pronguen added f: search triage bug Breaks something but is not blocking p-Medium Medium priority (to be solved within 1-2 years) labels Feb 12, 2021
rerowep added a commit to rerowep/rero-ils that referenced this issue Feb 12, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
@rerowep
Copy link
Contributor

rerowep commented Feb 12, 2021

This is not a bug, this is how it works in Elastic search. But we can change the display the way we want to.

@rerowep rerowep self-assigned this Feb 12, 2021
rerowep added a commit to rerowep/rero-ils that referenced this issue Feb 17, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Feb 18, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Feb 18, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
@iGormilhit iGormilhit removed the triage label Feb 23, 2021
rerowep added a commit to rerowep/rero-ils that referenced this issue Feb 23, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Feb 25, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Mar 2, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Mar 3, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Mar 3, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Mar 4, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Mar 4, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Mar 8, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Mar 8, 2021
* The functionality of the document main, sub type facet for documents with multiple types was not clear.
Now we display only the sub types accossiated with the main type in the facet.
* closes rero#1697
* Adds memoized decorator.
  (https://flask-caching.readthedocs.io/en/latest/api.html#flask_caching.Cache.memoize)

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
@rerowep rerowep closed this as completed in 5ccf99b Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Breaks something but is not blocking f: search p-Medium Medium priority (to be solved within 1-2 years)
Projects
None yet
Development

No branches or pull requests

3 participants