Hi,

Could you please tell me , how actually the querying is performed, so that I can write a "Tips" section describing, how to effectively search.

For eg: If you need to search for an exact match of two words, include your keywords inside "".

Regards,
Chithra

Comments

drunken monkey’s picture

Priority: Major » Normal

This depends on the "Query type"/"Parse mode" you have selected for your search in Drupal (either the search view or the search page configuration).
For "Single term", everything will be treated as a phrase, so only items containing exactly that sequence of words will be found. Special characters will be included in the search and have no deeper meaning – so, e.g., using quotes won't work.
For "Multiple terms", each word will be treated separately and the only special syntax recognized is quotes (") to form phrases. E.g., foo "bar baz" will return items that contain both the word "foo" and the exact phrase "bar baz".
For "Direct query" the entered keywords are passed to Solr verbatim, so the Solr Query Syntax is used (which depends a little on the Solr version used).

Chithra K’s picture

Hi,

Thank you for your reply.

Will the logical connectors like "OR", AND etc work?

Regards,
Chithra

Chithra K’s picture

I am using "Search Page"

drunken monkey’s picture

It's independent of the search backend, it only depends on the "Parse mode" / "Query type" setting. (Only the name changes, for whatever reason.)
And the answer is: only if you're using "Direct query". As said, the others only recognize quotes or nothing at all as special syntax. See #1616734: Parse mode for complicated/complex expressions for the feature request to fix this.

OanaIlea’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This issue was closed due to lack of activity over a long period of time. If the issue is still acute for you, feel free to reopen it and describe the current state.