0
votes

Is there a way to configure a solr config set/schema in such a way that new fields have the indexed property set to false when they are dynamically added as part of a document upload? I insert a large number of properties via a JSON source which changes infrequently, and I'd like to avoid having to identify these fields and update the fields' indexed attributes to false.

I also am not sure that updating fields which are dynamically added is making a difference anyway because I can see that the fields also have the stored attribute set to false, yet some (not all) of them are returned when I use "*" as the field selector for my query.

1

1 Answers

0
votes

Sounds like you want Solr's Dynamic Fields. As long as you have a predictable name, you can have a definition like:

<dynamicField name="*_i" type="int" indexed="true" stored="false"/>

Then, all fields that end with _i will indexed as an int (but not stored).