lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marek Tichy <ma...@gn.apc.org>
Subject Solr filter query on STRING field [Was:Re: solr filter query on text field]
Date Wed, 24 Oct 2018 08:59:30 GMT
Hi,

I'm having troubles with the filter query on a multiple string field,
specifically with a space between words. Looking at the histogram and
values using Solr UI it correctly shows that the indexing stores the
string "Key case" as it should. However the following filter queries:

fq=sm_field_tags:Key case      //doesn't work
fq=sm_field_tags:Key+case      //doesn't work
fq=sm_field_tags:Key*             //does work
fq=sm_field_tags:Key?case     //does work


Debug shows (for the first case):
"filter_queries":["sm_field_tags:Key case"],
"parsed_filter_queries":["sm_field_tags:Key id:case"]

Why does it parse to id: case ? Solr version is 7.4.0

Many thanks
Marek









> bq.  is there any difference if the fq field is a string field vs test
>
> Absolutely. string fields are not analyzed in any way. They're not
> tokenized. There are case sensitive. Etc. For example takd
> My dog
> as input. A string field will have a _single_ token "My dog.". It will
> not match a search on "my". It will not match a search on "dog". It
> won't even match "my dog." as a phrase since the case is different. It
> won't even match "My dog" because there's no period at the end. It
> will only match "My dog.".


Mime
View raw message