Skip to content

26 q2#631

Draft
dariok wants to merge 86 commits into
developmentfrom
26Q2
Draft

26 q2#631
dariok wants to merge 86 commits into
developmentfrom
26Q2

Conversation

@dariok
Copy link
Copy Markdown
Owner

@dariok dariok commented May 13, 2026

No description provided.

dariok and others added 30 commits April 20, 2026 14:26
- 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
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread edoc/rest2/projects.xqm Outdated
Comment thread edoc/rest2/projects.xqm Outdated
Comment thread edoc/controller.xql Outdated
@dariok
Copy link
Copy Markdown
Owner Author

dariok commented May 20, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread edoc/rest2/resources.xqm Outdated
Comment thread edoc/rest2/rest-common.xqm
dariok added 4 commits May 21, 2026 13:06
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)
@dariok
Copy link
Copy Markdown
Owner Author

dariok commented May 21, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread edoc/controller.xql Outdated
Comment thread edoc/rest2/rest-common.xqm Outdated
Comment thread edoc/rest2/resources.xqm Outdated
@dariok
Copy link
Copy Markdown
Owner Author

dariok commented Jun 2, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread edoc/modules/wdb-process.xqm Outdated
Comment thread edoc/resources/js/admin.js
@dariok
Copy link
Copy Markdown
Owner Author

dariok commented Jun 3, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread edoc/rest2/search.xqm
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";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread edoc/rest2/search.xqm
Comment on lines +102 to +103
"self": concat($r2:base, 'search/ft/resource/', $request?parameters?id, '?q=', $query),
"from": $r2:base || 'resources/' || $request?parameters?id,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment