the latest apachesolr module does not index already existing nodes, only newly created ones.

Comments

linksunten’s picture

Priority: Normal » Critical

We can confirm this bug which makes the module unusable for us.

Scott Reynolds’s picture

did you upgrade from an existing version? If so, did you run update.php ?

linksunten’s picture

No, we installed apachesolr for the first time on an existing site. The connection to the solr server works well, but the old documents are not indexed.

pwolanin’s picture

That's odd - we can check the install code, but I've never seen this.

On the admin page you can hit the re-index all content button, which should get all the nodes in.

pwolanin’s picture

Ah - one possible the possible problem. There was an error in the .info file, so the core search module was not marked as required. Do you have the search module enabled? No content will be indexed without that.

linksunten’s picture

We installed the latest dev-version, the search module is activated, we hit 'Re-index all content' and 'running cron' several times but still the existing documents are not indexed:

100% of the site content has been sent to the server. There are 0 items left to send.
The server has a 4 Minuten delay before updates are processed.
Number of documents in index: 1
Numer of pending deletions: 0

The Apache Solr Search index shows:
Number of documents in index: 1
Number of terms in index: 159
Number of fields in index: 42

pwolanin’s picture

When you say "documents" you mean nodes? the module only indexes nodes

linksunten’s picture

Yes, I mean nodes. I only talked about documents as this term is used by the module:
Number of documents in index: 1

pwolanin’s picture

Well, if the number here is off, it would seem likely that there was an error populating the table that lists those nodes and/or you have one or more node types set to be excluded from the index.

Double check all your settings and try disabling and re-enabling the modules.

cyberswat’s picture

subscribing. I'm experiencing the same thing on two sites I'm deploying over this weekend. Each site has ~65,000-70,000 nodes that have been imported. On the Solr admin page it is showing "Number of documents in index: 6" with 100% of the site content sent to the server. However, cron is running and on the normal search index at admin/settings/search it is processing 500 nodes per run and is at 47% with about 35,000 items left to index. I'm going to let the normal index complete itself and then step through everything again by uninstalling and reinstalling all the modules. I can verify that new content is immediately recognized and indexed by Solr.

All of the solr indexing worked perfectly on our dev staging servers as we were testing and we kept all of the settings the same as we moved to the testing servers. It's only the newly imported content that solr isn't recognizing.

pwolanin’s picture

How was the import done? If you are not using node_save(), I can imagine that the new node are not added to the apachesolr table - disabling and re-enabling shoudl fix this.

cyberswat’s picture

After the import the count of apachesolr_search_node was 0 ... completely uninstalling the solr modules and reinstalling them brought that count up to where it should be and everything seems to be functioning correctly again.

*edit* I'm checking with the devs that did the import to see if the pulled the new nodes through node_save ... will follow up.

cyberswat’s picture

Status: Active » Fixed

@pwolanin You are correct. The import they used did not pull the data through node_save ... so this is user error and not a bug in apachesolr.

damienmckenna’s picture

cyberswat: thanks for getting to the bottom of this :)

benorgan’s picture

I am also experiencing this problem but my nodes have not been imported, they were all created manually. The search index is showing as 0 items to index.

Have tried uninstalling and reinstalling the Apache Solr module but still doesn't work.

If I add a new item of content it appears in the index but no existing content is added.

Does Apache Solr need write permissions anywhere? Is there something else I should check?

Ben

robertdouglass’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.