On 6/11/2018 2:02 PM, Terry Steichen wrote: > I am using Solr (6.6.0) in the automatic mode (where it discovers > fields). It's working fine with one exception. The problem is that > Solr maps the discovered "meta_creation_date" is assigned the type > TrieDateField. > > Unfortunately, that type is limited in a number of ways (like sorting, > abbreviated forms and etc.). What I'd like to do is have that > ("meta_creation_date") field assigned to a different type, like > DateRangeField. > > Is it possible to accomplish this (during indexing) by creating a copy > field to a different type, and using the copy field in the query? Or > via some kind of function operation (which I've never understood)?
What you are describing is precisely why I never use the mode where Solr automatically adds unknown fields. If the field does not exist in the schema before you index the document, then the best Solr can do is precisely what is configured in the update processor that adds unknown fields. You can adjust that config, but it will always be a general purpose guess. What is actually needed for multiple unknown fields is often outside what that update processor is capable of detecting and configuring automatically. For that reason, I set up the schema manually, and I want indexing to fail if the input documents contain fields that I haven't defined. Then whoever is doing the indexing can contact me with their error details, and I can add new fields with the exact required definition. Thanks, Shawn