lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfonso Muñoz-Pomer Fuentes <>
Subject Use of blanks in context filter field with AnalyzingInfixLookupFactory
Date Mon, 12 Jun 2017 17:28:50 GMT
Hi all,

I was wondering if anybody has experience setting up a suggester with filtering using a context
field that has blanks. Currently this is what I have in solr_config.xml:
<searchComponent name="suggest" class="solr.SuggestComponent">
  <lst name="suggester">
    <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
    <str name="dictionaryImpl">DocumentDictionaryFactory</str>
    <str name="field”>property_value</str>
    <str name="contextField”>species</str>
    <str name="suggestAnalyzerFieldType">text_en</str>
    <str name="queryAnalyzerFieldType">text_en</str>
    <str name="buildOnStartup">false</str>

And this is an example record in my index:
  "species":"homo sapiens",

When I request for suggestions like this, everything’s fine:

But if I try to narrow by species, I get 0 results:

I’ve tried escaping the space, URL-encode it (with %20 and +), enclosing it in single quotes,
double quotes, square brackets... to no avail (getting 0 results except when I enclose the
parameter value with double quotes, in which case I get an exception). In the example record
above, species is of type string. In schemaless mode the results are the same.

Using underscores in the species lets me filter properly, so the filtering mechanism per se
works fine.

Any help greatly appreciated.

Alfonso Muñoz-Pomer Fuentes
Software Engineer @ Expression Atlas Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Tel:+ 44 (0) 1223 49 2633
Skype: amunozpomer

View raw message