project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Modify auto complete in support of advanced search forms utilizing semantic search tags (from 526) #5

Open gigamorph opened 4 months ago

gigamorph commented 4 months ago

Background: #55 introduced the auto complete endpoint with the intent of supporting the advanced search form context. It is functional, documented, and able to return matches quickly against the full dataset. However, at that time, the advanced search forms were not able to use semantic search tags because we were still waiting on ML 11 and all search form fields that were to offer auto complete were associated to semantic search tags. The original implementation would have allowed the advanced search forms to use the non-semantic search tag counterparts (*Id vs *Name) but doing so would have required users to select an auto completed value, which was deemed too restrictive on the users.

Until more is known and scope is locked down, this ticket is serving as a placeholder for changes we may want to make to auto complete after the forms are able to use semantic search tags (#504).

Candidate changes:

  1. Update the auto complete endpoint to accept the same search tag name that the search form field would use to construct the query: a semantic search tag name (vs. its non-semantic ID counterpart).
  2. If we no longer need to return the URI of the document, we may be able to optimize.
  3. Determine if these implementation notes are blockers for user acceptance.
  4. Add unit tests for the new auto complete library, if not other code modified in support thereof. Existing code that was modified may be found in PR https://git.yale.edu/lux-its/marklogic/pull/524.

Should we also consider https://docs.marklogic.com/REST/GET/v1/suggest?