Fixed Obscure search bug (stemming analyzer lost)

Wildcat Media

Well-known member
This is an obscure one.

Today I am going through all of our XF add-ons to see which ones have updated. I tried going to Resources here and using search, but it could not find the add-on. I finally had to dig back to the thread I posted in, find the link to the resource, and locate the add-on that way.

Here is the add-on I was looking for:

To reproduce this issue, go to the main Resources page and begin a search. Check off the two boxes "Search titles only" and "Search resources only". I first tried the phrase "partial IP search", as that is what the name is shown as in my add-ons list in XF. Could not find the add-on. If I try the word "partial" I can find it. If I try the word "search", though, it does not find the add-on.

Problem: the search stemmer either doesn't work on title searches, or doesn't work in the Resources area. I realize that Enhanced Search might not be in use for Resources, though, which is why I'm not sure if this is an obscure bug, or maybe it is supposed to be that way by design. I had thought it was mentioned that this forum ran with Enhanced Search enabled.

I tested a similar thread title search on our XF 1.1.5 forum with Enhanced Search and it found the post. Our XF 1.2 test forum, without Enhanced Search, did not find the same post as the basic search does not have a stemmer.
I think that "searching" may not be stemmed to "search", but I'd have to verify this. Stemmers are algorithmic so it may not always be correct.
It is stemming OK if I do this on our XF 1.1.5 which is running Enhanced Search. I can create a thread titled "searching", then use "search" as my search phrase and it finds it OK, even highlighting the word in the result.

Ok, not a direct bug per se - we lost the stemming analyzer selection. However, I think there is an issue in that if you delete the index (in one of 2 ways), we lose the stemming selection, thus reverting to standard. Generally shouldn't come up regularly - the whole index has to be deleted for it to happen. (And changing the analyzer doesn't seem to need an index rebuild in my tests, though that does confuse me...)

Moving to an ES bug.
Is this only affecting the Resources area, or the whole forum (if it is running ES)? I am just curious what to expect when I update our big board in a couple of days.
It's an ES bug so if affects all searchable content.

All you need to do is check the stemming analyzer option again.

OK--so if I reindex, I just make certain that is selected first, and the stemmer should work? That's not a major issue--I can do that. I will be rebuilding everything (caches, search index, etc.) after I do all of the upgrades anyway.

I did notice in our current copy of ES (1.0.1) that the option selections do not "stick" if they are chosen. In other words, I can select them, save the changes, reload the page, and they are unselected. Yet I know they work, since our searches function just as I had set them.
Interesting. I just checked, and mine had reverted back to standard as well. Rebuilding the indexes now.

What triggered the switch? Upgrading ES or XF or.....?
I had that issue using XF 1.1.3 and ES 1.0 where my settings did not "stick" when I set them in the control panel, but the stemmer was working properly anyway. It's almost like the forum was not reading the status of ElasticSearch.

This time around, I didn't even look at it beforehand. I upgraded XF to 1.2, ES to 1.0.2, went to the admin page and dumped the old indexes and rebuilt new ones. I had installed the Conversation Search add-on (which BTW is something I've waited several years for, starting in the vB 3.0 days :) ), so I needed to rebuild them anyway. I just checked and our stemmer is working properly on the new index rebuild, so to me, this wasn't a bug to worry that much about (confusing maybe, but far from catastrophic). Just make certain the correct choices are clicked before you generate the index and you should be good to go.
I've handled the situation where deleting the index wipes out the configuration (including stemming analyzer selected). It now maintains the settings when recreating the index.
Top Bottom