Try qt=dismax or deftype=dismax, I was also getting 0 results with
defType on 1.4.1. I'll see what's up with that...

But if that doesn't work...

May we see your dismax definition too? You shouldn't need the
quotes, so something's wrong somewhere....

What version of Solr are you using?

Also, please post the results of running your original query
with &debugQuery=on

Best
Erick

On Tue, Nov 16, 2010 at 10:28 PM, Chamnap Chhorn <chamnapchh...@gmail.com>wrote:

> I have one question related to single word token with dismax query. In
> order
> to be found I need to add the quote around the search query all the time.
> This is quite hard for me to do since it is part of full text search.
>
> Here is my solr query and field type definition (Solr 1.4):
>    <fieldType name="text_keyword" class="solr.TextField"
> positionIncrementGap="100">
>      <analyzer>
>        <tokenizer class="solr.KeywordTokenizerFactory"/>
>        <filter class="solr.LowerCaseFilterFactory" />
>        <filter class="solr.TrimFilterFactory" />
>        <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true"/>
>        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="false" />
>        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>      </analyzer>
>    </fieldType>
>
>    <field name="keyphrase" type="text_keyword" indexed="true"
> stored="false" multiValued="true"/>
>
> With this query q=smart%20mobile&qf=keyphrase&debugQuery=on&defType=dismax,
> solr returns nothing. However, with quote on the search query q="smart
> mobile"&qf=keyphrase&debugQuery=on&defType=dismax, the result is found.
>
> Is it a must to use quote for a single word token field?
>
> --
> Chhorn Chamnap
> http://chamnapchhorn.blogspot.com/
>

Reply via email to