Ask Your Question

underscore(_) is considered a white space in search?

asked 2011-05-26 20:23:50 -0500

Benoit's avatar

When we are searching with words that include an underscore (on a postgresql backend), it looks like the underscore is considered like a space and searches 2 words instead.

For example, putting long_word in the search box displays questions that have long AND word but does not specifically search for long_word.

Is it possible to change this behavior?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2011-05-27 03:58:37 -0500

Evgeny's avatar

Benoit, it is all done on the level of the database. Postgres itself tokenizes the query string, possibly it splits the words by the underscores as well. I gave only a very brief look into the docs and could not find anything quickly, but I will continue tomorrow.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-05-26 20:23:50 -0500

Seen: 154 times

Last updated: May 27 '11