Once you are done with configuring your Solr according to your use case, such as analyzers, tokenizers, and filters, you can actually test your configuration without indexing data. The Solr admin interface provides a very clean and easy way to test your configuration. Refer to the following screenshot to see analyzer page for core1:
Let's create a new field type and put the following configuration into schema.xml
:
<fieldType name="mytextfield" class="solr.TextField"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.HyphenatedWordsFilterFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType>
Now restart your Solr and go to the analyzer. Next, choose your defined field type, mytextfield, from the dropdown, like this:
Now you can type your input text and see how Solr indexes your data. You can play with different pieces of input text and analyze your analyzer setting for each field. Based on your use case, you can further modify your field type. Here is an example of this:
18.117.156.113