Search by Tags problem with multiple word tag

Hello,

I found a similar to mine problem described here (but it was written several years ago, so I hope there might be some clue by now…): http://omeka.org/forums-legacy/topic/search-problems.

If I have a publication with some several words keyword (for example: “beautiful summer”), neither the front page Search for Keywords, nor Search by Tags (http://www.XXXXX.com/items/search) would find that publication if searching only by one of these two above words (eg. search by “beautiful”, or search by “summer”; no results).

What’s interesting, the simple search (top-right) field in the admin panel works properly (displays the above publication as the search results after typing only one word of the 2-words keyword). But the advanced search still displays nothing…

I also would like to add, that none of the words from the keywords is used in the item title or description.

Do you see any idea, how to make the system search properly? Or maybe I shoud create the keywords in a different way (for example when adding multiple words keyword, also add each single word as another keywords; but this would be weird for users and admins).

Best regards,
Lukasz

Kris’ explanation from all those years ago still holds true: that’s still how it works.

The Item keyword search is designed to treat a tag as a whole token; there’s no partial matching within tags. The sitewide search on the other hand doesn’t treat tags specially at all, it just adds them to the mass of indexed text for an Item and searches with the regular MySQL fulltext search, which treats each word separately.

Without hacking the core to work differently, you’re left with just workarounds. Creating tags from the separated words would work, as you suggest. If you included the tags in some metadata field they’d also get picked up even as partial results. Depending on your specific use-case for tags, you could have just the split-up tags, and not the multi-word ones, which would also avoid the problem and avoid you having to have duplicated tags.