lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: SOLR 7.1 queries not including empty fields in results
Date Wed, 24 Jan 2018 23:17:39 GMT

: I am converting a SOLR 4.10 db to SOLR 7.1
: It is NOT schemaless - so it uses a ClassicIndexSchemaFactory.
: In 4.10, I have a field that is a phone number (here's the schema information for the field):
: <field name="Phone" type="string" indexed="false" stored="true"/>
: When inserting documents into SOLR, there are some documents where the 
: value of Phone is an empty string or a single blank space.
: But when these same rows are inserted into SOLR 7.1, the documents 
: returned for those rows have no Phone field

Are you still using the same solrconfig.xml you had in 4.10, or did you 
switch to using a newer sample/default set (or in some other way 
modified) solrconfig.xml?

I ask because even if you are using the ClassicIndexSchemaFactory, your 
update processor chain might be using TrimFieldUpdateProcessorFactory 
and/or RemoveBlankFieldUpdateProcessorFactory ?

When i use the sample techproducts configs in 7.1, I have no problem 
adding either an empty string or a bank space to a string field...

$ bin/solr -e techproducts
$ curl -H 'Content-Type: application/json' 'http://localhost:8983/solr/techproducts/update?commit=true'
--data-binary '[{"id":"white","foo_s":" "},{"id":"blank","foo_s":""}]'
$ curl 'http://localhost:8983/solr/techproducts/query?q=foo_s:*'
        "foo_s":" ",


View raw message