upenndigitalscholarship / deep

MIT License
3 stars 1 forks source link

STC # and BritDrama # need to search multiple numbers independently #204

Closed ZacharyLesser closed 3 months ago

ZacharyLesser commented 5 months ago

In each of these fields, there are 4 items that have multiple numbers in the field, separate by semicolons.

When a user searches for one of these numbers, it should return the record. Right now they have to enter both, with the semicolon, for the record to be hit. It should treat each number as a discrete number and either one of them will suffice to hit the record.

ZacharyLesser commented 5 months ago

When there is more than one number in these fields, they should appear in Display as follows, if possible:

1) lowest number first 2) alphabetically for those with a letter at the start 3) numbers before any with a letter at the start.

ZacharyLesser commented 4 months ago

These are the items with multiple BritDrama numbers:

1) DEEP 356, 357, 358 2) DEEP 1190, 1191 3) DEEP 5074.31, 5076.24 4) DEEP 449, 5074.24, 5076.17

These are the items with multiple STC/Wing numbers:

1) DEEP 441 2) DEEP 852 3) DEEP 1038 4) DEEP 5132

ZacharyLesser commented 4 months ago

DEEP, Greg, BritDrama, STC/Wing should all search for numerals, so that "25" does not also hit 251, 252, 525 etc

ZacharyLesser commented 4 months ago

Some problems resolved, but others created:

I think the problem with string searching has been solved, BUT: now we can no longer hit a record that has 2 STC/Wing or BritDrama #s.

If you search for STC/Wing = 14959 or BritDrama = 1488 or BritDrama = 1489, you get no hits. Because these numbers are all in records with more than one value for those fields.

Is this impossible to do unless we re-implement string searching here (which causes other problems)? If so, maybe the best way to handle this to add a second STC/Wing and a second BritDrama field and have these filters run on both those fields? (In most cases the second field will be empty)

apjanco commented 3 months ago

changed to regex with split on space, working for brit drama but not stc/wing. also make changes to OR after AND is working