i m new to solr so i really need someone to help me understand the fields below. What’s the meaning of the field if it’s stored=false, indexed=false? see the two examples below, what’s the differences? If the field is not stored, what’s the use of it…
<field name="test1" type="text" indexed="false"
stored="false" required="false" />
How about this one?
<field name="test2" type="text" indexed="false"
stored="false" required="false" multiValued="true" />
Thanks a lot!
It’s easier than it seems:
indexed: you can search on itstored: you can show it within your search resultsIn fact, there might be fields that you don’t use for search, but you just want to show them within the results. On the other hand, there might be fields that you want to show within the results but you don’t want to use for search. The
stored=falseis important when you don’t need to show a certain field, since it improves performance. If you make all your fields stored and you have a lot of fields, Solr can become slow returning the results.Of course, having both false doesn’t make a lot of sense, since the field would become totally useless.
The unique difference between your two fields is the
multiValued=true, which means that the second field can contain multiple values. That means that the content of the field is not just a text entry but a list of text entries.