26 q2#631
Conversation
- create and use a map in XQuery - store a detailed string in HTML meta - create and use a Map in JS Cf. #580
- in api.xq, add header Accept to a parameter in the request map Cf. #579
…search - adjust search.xqm to use IDs for forms (→ eventListener) - search.xsl must support XML as returned from new API - search.js handles onSubmit of FTS search form Cf. #579
- use consistent wording - always use `result` when returning lists - streamline the definition and use
Cf. #579 Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Used for paging project-based search and for creating KWIC for a file. This way, KWIC does not require a new search if the session is still active. Cf. #579 Co-authored-by: Copilot <copilot@github.com>
Results are now grouped by their computed path (below tei:text). This means we can add info about structural elements to the HTML view. This can also be used to filter the results. This might be more efficient than creating fields beforehand. Ideally, we can drop most of the specialised idexes. Cf. #579 #566
In general, only tei:text is indexed, with head getting an additional index, and note handled separately Cf. #566
Co-authored-by: Copilot <copilot@github.com>
Includes improved creation of JSON output and additional error handling and documentation Co-authored-by: Copilot <copilot@github.com>
include changes to wdbDocument.loadContent this is now smarter and accepts an optional selector indicating what to extract from the response Cf. #579
as we modify the request to add a header, auth needs to be set explicitly or will not be executed, meanin all operations requiring auth will fail
Projects created inherit owner and rights from parent; by default, this should be world readable
The path in found in $model?filePathInfo?mainProject and this does not need repeating. Also, the ID of the project is what’s actually expected here
removed stale code and added an ID in HTML
It erroneously assumed `resources` to reside in the project collection even for sub-projects. - All calls to applySpecificXsl had to be changed to use the pathInfo map; this included calls to r2:returnResponse which itself calls wdb:applySpecificXls - `start.xqm` had to be adjusted as it expects an element but now gets the response map
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcb658d277
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
against live system at ULB-DA
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3bb637c69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Closes #628
As the API definition always starts with `/api/v2/`, Swagger’s base URL must not contain it. To keep things uniform, we always add `api/V2` in rest-common. Cf. #631 (comment)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfffb1283e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3501d6798
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- use new API - keep option for reload Cf. #125
necessary to use different retsUrl in admin.js
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f6a83ba12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import module namespace kwic = "http://exist-db.org/xquery/kwic"; | ||
| import module namespace r2 = "https://github.com/dariok/wdbplus/rest2/common" at "rest-common.xqm"; | ||
| import module namespace wdb = "https://github.com/dariok/wdbplus/wdb" at "../modules/app.xqm"; | ||
| import module namespace wdbErr = "https://github.com/dariok/wdbplus/errors" at "error.xqm"; |
There was a problem hiding this comment.
Point the error import at the existing module
When the new search module is loaded for any /api/v2/search/... request, this relative import resolves within edoc/rest2/, but there is no edoc/rest2/error.xqm in the repo; the existing error module is edoc/modules/error.xqm (other modules import it as ../modules/error.xqm). As a result, importing search.xqm from api.xq can fail before either search endpoint runs.
Useful? React with 👍 / 👎.
| "self": concat($r2:base, 'search/ft/resource/', $request?parameters?id, '?q=', $query), | ||
| "from": $r2:base || 'resources/' || $request?parameters?id, |
There was a problem hiding this comment.
Include the API prefix in search result links
With config.xml now making $r2:base the app root (.../edoc) instead of the API root, concatenating bare search/... and resources/... here returns malformed links such as https://localhost/exist/apps/edocsearch/ft/resource/... and .../edocresources/... in successful file-search responses. Clients following the self or from URLs from /api/v2/search/ft/resource/{id} will be sent to non-existent paths; these should use the same $r2:urls prefixes used elsewhere in the commit.
Useful? React with 👍 / 👎.
No description provided.