Altinn / altinn-storage

Altinn platform microservice for handling instance storage
2 stars 3 forks source link

Extend free text search to find matches on instance #123

Closed acn-sbuad closed 1 month ago

acn-sbuad commented 3 years ago

Description

Instance exposes both presentation fields and data values. These fields should be searchable from the search API.

Considerations

Acceptance criteria

Specification taks

Development tasks

Test

Add test cases here as checkboxes that are being tested as part of the changes.

FTLems commented 1 year ago

Can we get org/krt tag on this issue?

acn-sbuad commented 3 months ago

Bug or irregularity related to the date filters. Tested in AT22, testuser 01014922047

Search word: 1234 Altering between period 2022 and all periods. An addition element is sorted under 2022 for all periods, but does not show up in the specific period search

https://github.com/Altinn/altinn-storage/assets/47737608/e6b981a9-9670-40d9-a011-efa54bc09f77

acn-sbuad commented 3 months ago

Characters with accents are not supported by the search. E.g. è. à etc.

Given the presentation field: André-test Messagebox does not allow you to search for André (Andr is allowed), and Andre will yield an empty result.

https://github.com/Altinn/altinn-storage/assets/47737608/988c34a0-a26c-4de3-a4d8-2fdade82b003

HenningNormann commented 3 months ago

Characters with accents are not supported by the search. E.g. è. à etc.

Given the presentation field: André-test Messagebox does not allow you to search for André (Andr is allowed), and Andre will yield an empty result.

20240524-1116-59.6409872.mp4

None standard ascii characters aren't allowed in the search field in the a2 message box. The border that boxes the search field gets red if you enter a special character, and the search will never get sent to the server.

HenningNormann commented 3 months ago

Bug or irregularity related to the date filters. Tested in AT22, testuser 12928296855

Search word: 1234 Altering between period 2022 and all periods. An addition element is sorted under 2022 for all periods, but does not show up in the specific period search

20240524-0839-42.4619245.mp4

Sjekk følgende kommentar fra meg fra team-core slack 8. desember 2023 kl 11:49:15:

Søkemodellen i SBL har forskjellige parametre for til og fra for hhv "created" og "lastchanged". Brukergrensesnittet i meldingsboksen populerer bare til/fra for created. For ikke-arkiverte elementer fungerer det ganske likt i SBL og A3. For arkiverte elementer blir det imidlertid en forskjell. I SBL vil tidsstemplene det søkes mot være forskjellige avhengig av om elementet er arkivert (og ligger med timestamp created i Archive databasen der created=arkiveringstidspunkt) eller om elementet ikke er arkivert og timestamp created i ServiceEngine databasen blir benyttet. I A3 har man bare ett tidsstempel for created. Siden oppløsningen på søkeparametrene i meldingsboksen er hele dager, vil det alltid bli forskjellig filtrering i SBL og A3 hvis ikke elementet er arkivert samme dag som det ble opprettet.

Hvis man skal få A3 søk til å fungere på samme måte som i SBL, kan man endre logikken slik at filtrering mot created må skje mot db kolonne created for ikke-arkiverte og mot db kolonne Archived (timestamp for arkivering) for arkiverte.

Det er også verd å nevne at når man gjør SBL søk via Rest-API, så kopieres til/fra i request inn i lastchanged parametrene i søkemodellen (i motsetning til created, som benyttes fra meldingsboksen). Har ikke sjekket for Soap. (edited)

acn-sbuad commented 3 months ago

Regression test of Bug or irregularity related to the date filters successful in AT22

acn-sbuad commented 3 months ago

Characters with accents are not supported by the search. E.g. è. à etc. won't be fixed as behavior matches Altinn 2.

acn-sbuad commented 3 months ago

Search on presentation texts fully implemented. Moving back to backlog as data values are not covered yet. PO can consider whether this is still a requirement or not.

olebhansen commented 1 month ago

Closing. Will follow up "advanced search" in a future roadmap.