Hi Alex, Thanks for your detailed explanation, it's much appreciated. I think you're right though and I need to take a step back. I really want to learn but for some reason it seems like something I just can't get any control over. I'll give your presentation a go and look for something that covers the included examples after.
Kind regards, Ronald. On Sun, Sep 6, 2020 at 3:52 AM Alexandre Rafalovitch <arafa...@gmail.com> wrote: > > That's a really hard way to get introduced to Solr. What about > downloading Solr and running one of the built-in examples? Because you > are figuring out so many variables at once. > > Either way, your specific issue is not in schema.xml (which should be > converted to managed-schema on first run, btw, don't have both in the > same directory). > > Your issue is in the solrconfig.xml and it is complaining about > schemaless mode missing the default type mapping for when no other > rules match. As explained at: > https://lucene.apache.org/solr/8_6_0/solr-core/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.html > > In your linked example, that's the line: > <str name="defaultFieldType">strings</str> > > In latest Solr, it is using the default flag instead, so maybe you > ended up not having either. I think the example basically skips all > the mapping and creates all fields automatically of type strings. So, > you can probably remove all processors apart from add-schema-field in > updateRequestProcessorChain definition and reintroduce the > defaultFieldType from original example. > > Hope that gets you where you want. If it does not, don't give up on > Solr, just step back a bit and get it working by itself first. Maybe > try following my presentation from a while ago: > https://www.slideshare.net/arafalov/from-content-to-search-speeddating-apache-solr-apachecon-2018-116330553 > , the associated Github repo is at: > https://github.com/arafalov/solr-apachecon2018-presentation > > Regards, > Alex. > > > On Sat, 5 Sep 2020 at 20:32, Ronald Roeleveld > <ronald.roelev...@gmail.com> wrote: > > > > Hi there, > > I'm a totally newb when it comes to Solr, I'm just trying to learn and > > teach myself new skills so please bear with me. > > > > I'm following a tutorial online: > > https://lobster1234.github.io/2017/08/14/search-with-nutch-mongodb-solr/ > > > > Since this tutorial is somewhat outdated I've changed some things to > > use current versions which is why I'm now running into issues. > > In order to solve any issues I've searched online and mostly solved > > everything with bits and pieces here and there. This part I can't seem > > to solve though. > > > > I've added a schema.xml and changed the solrconfig.xml as described in > > the tutorial and while Solr does start it gives me the following error > > message: > > > > mycol1: > > org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: > > Must specify either 'defaultFieldType' or declare one typeMapping as > > default. > > > > I've had errors before related to outdated lines in schema.xml but I > > was able to fix those (I think). > > > > This is my current schema.xml > > > > ------------- > > <?xml version="1.0" encoding="UTF-8" ?> > > <schema name="ph_config" version="1.6"> > > <field name="id" type="string" indexed="true" stored="true" > > required="true" multiValued="false" /> > > <field name="one" type="string" indexed="true" stored="true" /> > > <field name="two" type="string" indexed="true" stored="true" > > multiValued="true"/> > > <field name="three" type="string" indexed="true" stored="true" /> > > <!-- docValues are enabled by default for long type so we don't > > need to index the version field --> > > <field name="_version_" type="plong" indexed="false" stored="false"/> > > <field name="_root_" type="string" indexed="true" stored="false" > > docValues="false" /> > > <field name="_text_" type="text_general" indexed="true" > > stored="false" multiValued="true"/> > > <uniqueKey>id</uniqueKey> > > <fieldType name="string" class="solr.StrField" sortMissingLast="true" > > docValues="true" /> > > <fieldType name="plong" class="solr.LongPointField" docValues="true"/> > > <fieldType name="text_general" class="solr.TextField" > > positionIncrementGap="100" multiValued="true"> > > <analyzer type="index"> > > <tokenizer class="solr.StandardTokenizerFactory"/> > > <filter class="solr.StopFilterFactory" ignoreCase="true" > > words="stopwords.txt" /> > > <!-- in this example, we will only use synonyms at query time > > <filter class="solr.SynonymGraphFilterFactory" > > synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> > > <filter class="solr.FlattenGraphFilterFactory"/> > > --> > > <filter class="solr.LowerCaseFilterFactory"/> > > </analyzer> > > <analyzer type="query"> > > <tokenizer class="solr.StandardTokenizerFactory"/> > > <filter class="solr.StopFilterFactory" ignoreCase="true" > > words="stopwords.txt" /> > > <filter class="solr.SynonymGraphFilterFactory" > > synonyms="synonyms.txt" ignoreCase="true" expand="true"/> > > <filter class="solr.LowerCaseFilterFactory"/> > > </analyzer> > > </fieldType> > > <fieldType name="booleans" class="solr.BoolField" > > sortMissingLast="true" multiValued="true"/> > > <fieldType name="pdates" class="solr.DatePointField" > > docValues="true" multiValued="true"/> > > <fieldType name="plongs" class="solr.LongPointField" > > docValues="true" multiValued="true"/> > > <fieldType name="pdoubles" class="solr.DoublePointField" > > docValues="true" multiValued="true"/> > > </schema> > > > > -------------- > > > > I hope someone is able to get me started with this. I'd like to learn > > but it feels like a really steep hill to climb. > > > > Kind regards, > > Ronald.