arch-kiosk / arch-kiosk-office

💼 central place for collaboration
GNU Affero General Public License v3.0
1 stars 0 forks source link

FTS: Search for word and unit identifier #2611

Open urapadmin opened 5 months ago

urapadmin commented 5 months ago

Ah wait. So I searched for "pen" and got these 6 results:

Screenshot 2024-03-24 at 5 46 42 PM Screenshot 2024-03-24 at 5 46 50 PM

Then I did LA + pen, expecting to get 5 results (only missing the PBA one), but I get 3:

Screenshot 2024-03-24 at 5 47 44 PM

But shouldn't the 511-1 records also be found with that search? 511-1 is a collected material in LA:

Screenshot 2024-03-24 at 5 48 49 PM

Originally posted by @luizaogs in https://github.com/arch-kiosk/arch-kiosk-office/issues/2504#issuecomment-2017026827

urapadmin commented 5 months ago

@lbestock (copying you here, because all this is currently learning how FTS works) you will roll your eyes in disbelief, but my first hunch is that "LA" is not actually IN the missing collected material. It is more that the collected material is in LA. We know that, the full text search does not. So when we are searching for identifiers in this one, they are treated like any other word. But I'll look at your example more closely, maybe there is more going on there than what I hunch at.

This needs some thinking, I am not sure how to address it without producing otherwise counter intuitive search results.

urapadmin commented 5 months ago

hunch confirmed. 511-1 does not have LA in any of its text fields (also not in its own identifier, which would have helped in this instance but only masked the more general issue)

urapadmin commented 5 months ago

@luizaogs totally unrelated: Is there a way for you to use JPG for your screenshots? These PNGs are huge and load sluggishly across an ocean.

urapadmin commented 5 months ago

@luizaogs totally unrelated: Is there a way for you to use JPG for your screenshots? These PNGs are huge and load sluggishly across an ocean.

forget it. At least on windows the JPGs get even larger unless one compresses them etc. Not worth the effort.

luizaogs commented 5 months ago

Would some sort of search filter help? I’m just thinking that if I had been able to filter for LA up there and that included 511 it would have been a non-issue.

urapadmin commented 5 months ago

that is what #2602 is about. I find it hard to explain to users that there are sort of two search fields, one that is defining the archaeological contexts and scope of the search and one that is full text searching. Perhaps I can identify identifiers (no pun intended) automatically and just react magically to your request. But then perhaps one day you want to search for "room II" and "room II" is a tag (which is an archaeological context in Kiosk) and then the search thingy does not search for texts anymore.

in other words: It is more complex than a single use case suggests. As usual. I am still thinking about it ...