You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Thomas Kellerer <sp...@gmx.net> on 2010/10/08 10:00:03 UTC

Strange search result (or lack of)

Hi,

I have the following field defined in my schema:

<fieldType name="name_field" class="solr.StrField" positionIncrementGap="100" omitNorms="false">
   <analyzer>
     <tokenizer class="solr.KeywordTokenizerFactory"/>
     <filter class="solr.StandardFilterFactory"/>
     <filter class="solr.ISOLatin1AccentFilterFactory" />
     <filter class="solr.LowerCaseFilterFactory" />
     <filter class="solr.TrimFilterFactory" />
   </analyzer>
</fieldType>

<field name="name_de" type="name_field" indexed="true" stored="true" />

The field contains the value "Das Urteil" which is thus stored as "das urteil"


The following query (using Solr 1.4) returns nothing
   name_de:das urteil


But when I run the query
   name_de:"das urteil"

the expected document is found.

When I check this through the "Analysis" page of the solr admin it does show me a match for the first query.

I'm sure I'm missing something obvious. But what?

Regards
Thomas



Re: Strange search result (or lack of)

Posted by Savvas-Andreas Moysidis <sa...@googlemail.com>.
Hello,

Try searching for name_de:(das urteil). A search for name_de:das urteil will
search for "das" in *name_de* and for "urteil" in the default field (e.g.
"catch all" field).

Hope that helps,
-- Savvas

On 8 October 2010 09:00, Thomas Kellerer <sp...@gmx.net> wrote:

> Hi,
>
> I have the following field defined in my schema:
>
> <fieldType name="name_field" class="solr.StrField"
> positionIncrementGap="100" omitNorms="false">
>  <analyzer>
>    <tokenizer class="solr.KeywordTokenizerFactory"/>
>    <filter class="solr.StandardFilterFactory"/>
>    <filter class="solr.ISOLatin1AccentFilterFactory" />
>    <filter class="solr.LowerCaseFilterFactory" />
>    <filter class="solr.TrimFilterFactory" />
>  </analyzer>
> </fieldType>
>
> <field name="name_de" type="name_field" indexed="true" stored="true" />
>
> The field contains the value "Das Urteil" which is thus stored as "das
> urteil"
>
>
> The following query (using Solr 1.4) returns nothing
>  name_de:das urteil
>
>
> But when I run the query
>  name_de:"das urteil"
>
> the expected document is found.
>
> When I check this through the "Analysis" page of the solr admin it does
> show me a match for the first query.
>
> I'm sure I'm missing something obvious. But what?
>
> Regards
> Thomas
>
>
>