ElkArte Community

Project Support => Support => Topic started by: badmonkey on October 18, 2016, 02:53:11 pm

Title: Search by subject
Post by: badmonkey on October 18, 2016, 02:53:11 pm
A member on my large board pointed out searching by subject isn't working properly.  Using a search term, which should be a common term on the board, only returns two results total.  Manually navigating comes up with more matches on the first couple of pages. 

Search settings are to use a Fulltext Index.  The index exists, according to the ACP.  Where is a logical starting point?  Thanks!
Title: Re: Search by subject
Post by: Spuds on October 18, 2016, 06:45:10 pm
I might be off in the woods on this one, but I think fulltext actually only creates an index on the message body column so the search by subject using that index might be kind of BS

Do you have the option "force the use of a search index" checked, if so try un checking that and see if it helps,
Title: Re: Search by subject
Post by: badmonkey on October 18, 2016, 09:12:34 pm
Thanks spuds.  Tried unchecking as suggested.  The results were the same.  It's interesting it comes up with exactly two results, the same ones every time.  What else should I try?
Title: Re: Search by subject
Post by: emanuele on October 19, 2016, 02:28:19 am
Try not using fulltext search?
Title: Re: Search by subject
Post by: badmonkey on October 19, 2016, 07:07:26 am
Should have mentioned it, but sure did.   ;)
Title: Re: Search by subject
Post by: Spuds on October 19, 2016, 07:38:11 am
Did a very quick look at the code and we only create the fulltext on the body col not on the subject col.

I don't know the reason for this, could have been a limitation of fulltext on some older versions of mysql, but one could create a second fulltext on the subject, or even (I think) a combination index based of both.   If that is correct then we have some work to do  to make improvements.

So all that said, I'd feel you should use the custom search index (that should work) and drop the fulltext until we get this sorted.
Title: Re: Search by subject
Post by: badmonkey on October 19, 2016, 10:15:33 am
Cool!  Thanks Spuds!  :)