lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alvaro Cabrerizo <topor...@gmail.com>
Subject Re: Exact match works only for some of the strings
Date Thu, 16 Mar 2017 20:18:35 GMT
Hello,

I've tested on an old solr 4.3 instance and the schema and the field
definition are fine. I've also checked that only the
query nameExact:"Guardian EU-referendum" gives the result, the other one
you have commented (nameExact:"Guardian US") gives 0 hits. Maybe, you
forgot to re-index after schema modification. I mean, you indexed your
data, then changed the schema and then start querying using the new schema
that does not match your index.

Hope it helps.

On Thu, Mar 16, 2017 at 7:50 PM, Mikhail Khludnev <mkhl@apache.org> wrote:

> You can try to check debugQuery to understand how this query is parsed:
> double quotes hardly compatible with KeywordTokenizer. Also you can check
> which terms are indexed in SchemaBrowser. Also, there is Analysis page at
> Solr Admin.
>
> On Thu, Mar 16, 2017 at 8:55 PM, Gintautas Sulskus <
> gintautas.sulskus@gmail.com> wrote:
>
> > Hi All,
> >
> > I am trying to figure out why Solr returns an empty result when searching
> > for the following query:
> >
> > nameExact:"Guardian EU-referendum"
> >
> >
> > The field definition:
> >
> > <field name="nameExact" type="exactString" indexed="true" stored="true"
> />
> >
> >
> > The type definition:
> >
> > <fieldType name="exactString" class="solr.TextField"
> > sortMissingLast="true" omitNorms="true">
> >
> > <analyzer>
> >
> > <tokenizer class="solr.KeywordTokenizerFactory"/>
> >
> > <filter class="solr.LowerCaseFilterFactory" />
> >
> > </analyzer>
> >
> > </fieldType>
> >
> > The analysis, as expected, matches the query parameter against the stored
> > value. Please take a look at the attached image. I am using
> > KeywordTokenizer and LowerCaseFilter.
> > ‚Äč
> > What is more strange, the query below works just fine:
> >
> > nameExact:"Guardian US"
> >
> >
> > Could you please provide me with some clues on what could be wrong?
> >
> > Thanks,
> > Gintas
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message