Go here: http://drupal.org/project/issues/search/views?text=and

When I'm typing word AND, it says:

You must include at least one positive keyword with 3 characters or more.

Word "AND" has 3 letters and it's confusing.
I know that AND is regex, but code can be improved.

I'm not sure to which module it's related.

CommentFileSizeAuthor
#6 andsearch.png16.19 KBjhodgdon

Comments

avpaderno’s picture

I would take it means to use AND after a word of at least three characters; it does not accept you use AND like first word.

avpaderno’s picture

Title: When typing AND, there is message: You must include at least one positive keyword with 3 characters » When typing AND, there is message that says to include at least one positive keyword with 3 characters
kenorb’s picture

Project: Drupal.org site moderators » Drupal core
Version: » 7.x-dev
Component: Other » search.module

URL: search/node/and

avpaderno’s picture

I guess "and" is treated as a conjunction, and not as a word to search.

kenorb’s picture

Priority: Normal » Minor

But message in this case is confusing.
Search should be passed when AND have no any arguments, or message should be changed to correct.

jhodgdon’s picture

StatusFileSize
new16.19 KB

Agreed, the message is confusing. Take a look at this search page.

jhodgdon’s picture

Priority: Minor » Normal
Issue tags: +error message, +ui-text usability

tagging and changing priority.

avpaderno’s picture

I guess that it should be explained better what positive word means, or that and is not considered.
Are there any other words with three or more characters that are not considered positive words?

jhodgdon’s picture

The word "positive" there is rather hard to understand and should be removed.

OR is the only other word that is special, as far as I can see from the code.

avpaderno’s picture

You must include at least a keyword with 3 characters or more that is different from AND.

I agree that positive keyword is too difficult to be understood from all users, and is too generic. I take it means words without a particular meaning for the search engine, but that is not explicitly stated from the error message, which should report exactly which words are not considered.

jhodgdon’s picture

OR is the only other word that is caught as a special case by the search engine -- might as well mention both of them. The 3 character limit is configurable, so someone could set it to 2.

jhodgdon’s picture

Status: Active » Closed (duplicate)

There are some other quirks of the search that definitely need to be mentioned. I think that this issue and #146278 are close enough to be considered duplicates. I'm moving the other one to be Drupal 7.x and adding some details to it, and I'm closing this one as a duplicate.