project-lux / lux-marklogic

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

Match names restricted to a facet's values (from 533) #6

Open gigamorph opened 4 months ago

gigamorph commented 4 months ago

For some of the facets, the user should be allowed to enter part of a facet value's name and be presented with matching names.

At present, the backend does not include names as part of a facet response. And Kam is concerned this would be too much to do client side --it presently only retrieves the subset of names displayed --the number of values for some facets for some searches could really bog the frontend down.

An implementation choice is to extend the auto complete endpoint to accept search criteria and restrict matches to the provided text and search criteria. To our benefit, auto complete's implementation (#55) already uses cts.search and related list's implementation (#479) already refactored the part of the search library that generates queries from a search string.

Which facets are in scope of this ticket? Auto complete's current implementation is well suited to be immediately extended for non-semantic facets restricted by non-semantic search criteria. Thus, that's what I would limit the scope of this ticket to.


Beta 1's means to resolve semantic and non-semantic search criteria via CTS Search partially invalidates the following. That said, when it comes to facets, #637 had us switch to cts.fieldValues which should continue to encourage us to limit this ticket's scope to non-semantic facets --those backed by a field range index.

~A separate ticket could be created for semantic requirements; such a ticket could be implemented after:~


Auto complete's performance has not been proven. Response time can vary by text + index combination, as well as concurrent demand. However, typically cts.search's performance improves when more criteria is specified.

For current auto complete capabilities, please see the auto complete endpoint documentation. The endpoint consumer may presently specify whether the match should be against primary names or primary and alternative names.

55 enabled auto complete for the following fields:

If the in-scope facets are associated to additional fields, we'll need to ensure there is also a field range index for it, likely be changing the "Force Range Index?" column value to 'Y' in the database index configuration spreadsheet then regenerating the database index configuration as documented in Database Index Configuration. If this is determined necessarily, please add the "re-indexing required" label.

Blocked/Dependencies: blocked by: https://github.com/project-lux/lux-frontend/issues/1

Related Issues: old tix: https://git.yale.edu/lux-its/marklogic/issues/533

cc: @pc754, @sk969