0

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.

1 Answer 1

2

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.

1
  • Thank you for your reply. I have a question what are "Drupal Solr integration modules"? Do you mean apache solr module (drupal.org/project/apachesolr) ?
    – jmu
    Sep 22, 2016 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.