indexingsolrsolrjsolrcloudsolr4

Solr Admin Query doesn't show all the attributes available in the collection schema


I have a solr 8.4.1 collection that has the attributes like below -

enter image description here

But when I run a query against that collection, it brings back just very few attributes as shown below. I have run this query for 10000s of records also, passing in * in the fl value, but it never shows the other attributes for any of the records in the collection.

enter image description here

Would be grateful if someone can give me some idea as to why most of the attributes getting dropped while the query is run, even though the schema contains those attributes and some of it should be populated as well.

NOTE: Most of the fields that are not getting retrieved have the field type - org.apache.solr.schema.TextField


Solution

  • Text fields are sometimes indexed (so you can search the values inside them) but not stored. When they are not stored you cannot retrieve their values in a query, which looks a lot like what's going on here.

    You can check the specifics of the fields in question in the Schema screen. For an stored field you should see something like this:

    enter image description here

    whereas for a not-stored field you'll notice that "stored" column is missing:

    enter image description here