Hi,

Thank you for your replies.
Sorry, forgot to specify, I am using Solr 4.10.3 (from Cloudera CDH 5.9.0).

When I search for name:Guardian I can see both  "Guardian EU-referendum"
and "Guardian US" in the result set.
The debugQuery results for both queries are identical
http://pastebin.com/xr96EF0r
Reindexing did not help.


Cheers,
Gintas



On Thu, Mar 16, 2017 at 8:18 PM, Alvaro Cabrerizo <topor...@gmail.com>
wrote:

> 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 <m...@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.suls...@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
> >
>

Reply via email to