You can either escape the whitespace with "\" or search as a phrase.
fieldNonTokenized:foo\ bar ...or... fieldNonTokenized:"foo bar" On Thu, Nov 22, 2012 at 9:08 AM, Varun Thacker <varunthacker1...@gmail.com>wrote: > I have indexed documents using a fieldType which does not break the word > up. I confirmed this by looking up the index in luke. I can see that the > words haven't been tokenized. > > I use a search handler which uses edismax query parser for searching. > According to the wiki also > http://wiki.apache.org/solr/ExtendedDisMax#Query_Structure Extended DisMax > breaks up the query string into words before searching. Thus no results > show up. > > Example for q=foo bar: > In the index : fieldNonTokenized:foo bar > > And when searching this is the final query getting made > is: ((fieldNonTokenized:foo:foo)~0.01 (fieldNonTokenized:foo:bar)~0.01)~1 > > Thus no document matches and returns no result. I can understand why this > is happening. Is there any way where I can say that the query string should > not be broken up into words? > > -- > > > Regards, > Varun Thacker > http://www.vthacker.in/ >