Closed MennaRempt closed 2 years ago
This is related to issue #292 from 2020
SermonDescrSuperForm
SuperOneWidget
filter_queryset()
implementation, which puts 'direct hits' above (as per django-select2 issue ) - this is about 'containing' particular string(s)
EqualGoldLinkForm
newsuper
) is: EqualGoldWidget
filter_queryset()
as aboveWhen linking an AF to a manifestation, it is now only possible to search for exact strings, whether double quote marks are used or not.
Can you clarify? Perhaps with an example? I had implemented and am seeing a marked difference between the two options.
The order is as in issue #292
The order is as per this issue #432
Without quotation marks, you can search for an exact string, as in
but adding information elsewhere in the AF information , e.g. part of the Gryson code (which should be possible) means that the results are no longer found:
Well, if one types per moysen hi
, the search algorithm tries to look for any field (code, author name, incipit, explicit, signature) that contains per moysen hi
in upper or lower case. So it is logical that no results are found.
If one types "per moysen" hi
, the idea is that it looks for two 'chunks' in all of those fields: (a) per moysen
and (b) hi
How would one expect the system to search??
E.g: when the user types per moysen hi
, then search and order the AFs, by...???
Okay, I've now done it using this scheme:
hitcount
is calculated:
1
is added to the hitcounthitcount
is the number of chunks found in one or more fields of a recordhitcount
(and at the second level alphabetically by code
)per moyen hi
, each field (code, author name, incipit, explicit, signature) will be checked for the presence of per
(i.e. also hitting personal
), moyen
and hi
(also hitting shield
, hiera
etc)3
points, a hit for the second 2
, and a hit for the third 1
- then the hitcount
would be higher for records containing that first word)Works perfectly now!
When adding links (both between Sermon-SSG and SSG-SSG), it is often difficult to find the correct SSG to link to. There should be a possibility to search for exact strings (e.g. using quotation marks? those should not occur in any incipit/explicit or signatures), and results that correspond most closely to the search terms should be at the top of the list of results. So, when searching for CAE s 100, 'CAE s 100' and 'CAE s 100A' should be the first results, then followed by e.g. AU s 100. Currently seaching for "CAE s 100" gives all Caesarian sermons as results, since they have "CAE s " and "100-" (from CPL 1008.#) in them.
NB. it should still be possible to search for non-exact strings, e.g. for an author + word from the incipit/explicit combination.