Using Solr Schema, Fields and Documents

Introduction    This is a little of a jump but I think its an important place to start because of the topics explain how Solr Works as well as how to use it toward your project. So For now lets just pretend you have solr running and just want to know how Solr takes data. Take it from me read the Reference Guide at least once as it is an easy read and very useful. I take a lot of the material in it and summarize it for my own use so that I can brush up on concepts. 

How to think of Solr

    As the Reference Guide would say "Solr is like a loose-leaf book of recipes, every time you add an new recipe you update the index in the back". Solr allows you to index with fields or types and by giving solr the fields data type you tell solr how to index. 

Scheme, Fields and Documents

     This is where you tell Solr how to index the data that gets imported, but what is a scheme with the fields?
Information for solr is sorted by fields and in another way fields are just information but that's just to mess with your head ha-ha. Still documents (any kind of file) can contain any type of information at this attached to fields and then matched to other documentation in the same field.  Solr figures how to use incoming data by using the Field Analysis which is used for the Analyzers, Tokenizers, and Filters.

Solr Field Types - How data is interpreted/Queried
Definitions/Properties - A Field includes three parts; name, class name, and attributes. If field type is TextField there is a description of the field analysis. 

    A Field is defined in the schema.xml file, and if you download a new version of Solr you will find an example of what one looks like in the path: solr-4.4.0\solr-4.4.0\example\solr\collection1\conf.
"The Schema.xml file needs to be called schema.xml and should be in the conf directory under the solr home folder." The defaults are ./solr/conf/schema.xml, more information on it here.  
//The example schema.xml is not complete like the guide explains.
   <solrQueryParser defaultOperator>


Popular posts from this blog

Nginx Best Practices Extended

Installing Windows on Acer chromebook 15 cb3-532

Entity Framework: ToListAynsc & WhereAsync