Unexpected results when using full-text search

We are seeing odd search results when using the full-text search feature on the advanced search page. The first is that if you enter two values it seems to do an OR search when most users would expect an AND search. The second is that it seems to search the word “and” as an actual value instead of ignoring it. Here is an example.

If I use the Search by Value fields to construct a search for any field has Garrop AND any field has Helios, I get 3 records. This is what I would expect.

If I enter Garrop Helios in the full-text search, I get 6 results. That is all the records that have Garrop OR Helios.

If I enter Garrop and Helios in the full-text search, I get pretty much all the records since most have an “and” in the description.

Is this default behavior or something wonky with our installation?

1 Like

Your description of how the search operates is correct: each term is considered “optional,” but the relevance sorting will prioritize results that include more of the given terms.

“and” isn’t considered a stop word by the MySQL fulltext search implementation, so it’s going to be treated like any other word.

There’s another option for the fulltext search of “boolean” mode where you can use plus and minus characters to specify that words must or must not appear in the returned results. At the moment, we don’t expose boolean mode from the fulltext search inputs, but it’s something we could look to add, by a configuration option or another input to select the mode.

Thanks. That helps our understanding of how this works.

Regarding Boolean +/-, if it is fairly easy to add, I think it would benefit advanced researchers who are used to having that sort of specificity in searching.

Thanks!