arafalov commented on pull request #1863:
URL: https://github.com/apache/lucene-solr/pull/1863#issuecomment-696704951
@noblepaul Good point:
1. **bin/solr start**
2. Edit the default configset's add-schema-fields definition to
- Replace AddSchema... with GuessSchema... URP
- Remove _default_ parameter (code automatically widens to "String" as
last step)
- Remove _Integer_ mapping, where _Long_ already exists (code
automatically widens to nearest acceptable definition for numerics)
3. **bin/solr create -c guess**
4. **bin/post -c guess -params "guess-schema=true"
example/exampledocs/*.xml**
5. As post does indexing and then commit, it triggers both phases of the URP
6. At the point, the schema is created (based on all data) but nothing is
actually indexed; the user can review and adjust the schema without any issues
7. Flag value can actually be anything for now, in the future I was thinking
that maybe this could be a tag to mark new fields (see SOLR-14855)
8. **bin/post -c guess example/exampledocs/*.xml**
9. Now the data is entered and can be searched
10. **bin/post -c guess -params "guess-schema=true"
example/films/films.json**
11. **bin/post -c guess example/films/films.json**
12. This shows that we don't need the "extra steps" instructions, the films
example current requires.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]