How does apache solr search recognize my changes by mysql query in my database I would like to use mysql query to modify some of my data. But I found that apache solr doesn't index all my changes.

For example, I modified some products' category in the field_data_field_category table through query yesterday. When I went to those products' content edit page, the category shows correctly. However, I found that Apache Solr doesn't count any of them into Remaining Item.

Does anyone know how does apache solr search work? Or what kind of query I should use to achieve my goal.
Solr maintains in own search index separated from the database. A process is required to index content from your database into Solr's index. Usually, this is done transparently by the Drupal Solr integration modules. These integrtions rely on usage of Drupal API for content changes. These API allow integration code to be executed on changes. This code will either index the change directly, or mark the content for re-indexation during the next cron run.

By accessing the database directly, you bypass Durpal's APIs and prevent the integration module to see your changes.

If this is a one off operation, you should be able to mark all content for re-indexation from the administration page of your Solr integration module.