Hi Peter, Here are two different ways to do it.
1) Use phrase query q=yourField:"new y" with the following type. <fieldType name="prefix_full" class="solr.TextField" positionIncrementGap="1"> <analyzer type="index"> <tokenizer class="solr.KeywordTokenizerFactory" /> <filter class="solr.TrimFilterFactory" /> <filter class="solr.LowerCaseFilterFactory" /> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="20" /> </analyzer> <analyzer type="query"> <tokenizer class="solr.KeywordTokenizerFactory" /> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> </fieldType> 2) Use prefix query q={!prefix f=yourField}new y with following type: https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-PrefixQueryParser <fieldType name="text_lower" class="solr.TextField" positionIncrementGap="1"> <analyzer> <tokenizer class="solr.KeywordTokenizerFactory" /> <filter class="solr.TrimFilterFactory" /> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> </fieldType> By the way I don't post on StackOverflow. Ahmet On Thursday, January 9, 2014 7:51 PM, PeterKerk <vettepa...@hotmail.com> wrote: Hi Ahmet, Thanks. Also for that link, although it's too advanced for my usecase. I see that by using KeywordTokenizerFactory it almost works now, but when I search on: "new y", no results are found, but when I search on "new", I do get "New York". So the space in the searchquery is still causing problems, what could that be? Thanks again! ps. are you guys (like you, Erick, Maurice etc.) also active on StackOverflow? At least you'll get the credit for good support :) -- View this message in context: http://lucene.472066.n3.nabble.com/Searchquery-on-field-that-contains-space-tp4110166p4110515.html Sent from the Solr - User mailing list archive at Nabble.com.