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

Optional URL argument parameters expected for search URL - "no argument pattern in search url" #36

Open
ivaylomitrev opened this issue May 13, 2023 · 5 comments

Comments

@ivaylomitrev
Copy link

I see that "no argument pattern in search url" is reported as failure for the dokumentbeskrivelse, dokumentobjekt, registrering, and mappe endpoints in my tests, but the specification states that templating is optional.

I assume this is something that has to be fixed in the tester, but am open to criticism if it is an issue with my tests.

Additionally, I believe the specification does not imply which resources/endpoints must support searching (they leave it to the vendors to decide) in which case I am not sure the tester can assume that the aforementioned resources will always expose search.

@petterreinholdtsen
Copy link
Owner

petterreinholdtsen commented May 13, 2023 via email

@petterreinholdtsen
Copy link
Owner

petterreinholdtsen commented May 13, 2023 via email

@ivaylomitrev
Copy link
Author

I was actually referring to the section on Søk in chapter 6:

$search brukes for generelt søk. Arkivkjernen bestemmer hvordan denne er implementert med hensyn på hvilke felter den inkluderer i søk og om for eksempel innhold i dokumenter er med.

I'm sorry for not clarifying earlier.

It seems that the tester tool expects that this is present for mappe, registrering, dokumentbeskrivelse, dokumentobjekt. Even if it didn't however, the test failure seems to be raised when {} (curly braces) are not found in one of the aforementioned resource URLs which implies templating which is optional:

Feltet «templated» er valgfritt og verdien skal antas å være «false» hvis det ikke finnes

@petterreinholdtsen
Copy link
Owner

petterreinholdtsen commented May 15, 2023 via email

@tsodring
Copy link
Collaborator

$search was an issue of contention when the current editorial board took over. I do not think that it should be an independent vendor decision, rather all vendors should come together and describe their search capabilities and see if we can reach a common understanding.

Personally, I think it's a great tool to explore how to combine text search (documents) in combination with metadata search $filter. I have not been able to implement the combination of the two properly yet, but it is something I am exploring.

The following are relevant examples.

  • Search all documents in all file objects and below for the term 'monstermaste"`
    • mappe?$search="monstermaste"
  • Search all documents in a given file object for the term "monstermaste"
    • mappe/7fe4288f-dfd1-43fb-ae29-1ed5cb42489b?$search='monstermaste"
  • Search all documents within all file objects for the term"'monstermaste", where a child record has the word protest in the description
    • mappe?$search='monster maste"&$filter=contains(registrering/beskrivelse, 'protest')

Should $search be limited to document contents? Should it just be a search across metadata fields? Should it be a combination? Should the project say something about weight and result list ranking? (Probably not) These are issues that need to be discussed in the API project. The combination of these two approaches provide for an extremely expressive approach to search in a record keeping core. I am not aware that any vendor has such capabilities, and think that requiring this kind of query support will really lift the value of such a piece of software.

Should we have a:

arkivstruktur/?$search="monstermaste" to search 'everything'

We have also been exploring combining $search with elasticsearch search token restrictions.

Until we have a consensus on what $search should do, it has been left up to vendors to interpret. We would love to hear what you guys think $search should do when you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants