Grant Ingersol (Solr Maintainer) announced that they were scheduling a January release of 1.4
Since it is mostly stable and has several features (http://issues.apache.org/jira/browse/SOLR/fixforversion/12313351) that we want, and since this module is not looking at a 1.0 release before Jan, it seemed prudent to switch to trunk now.
In addition, there is a new version of the SolrPHPClient which supports 1.4 and has new APIs for boosting and balancers. In order to stay in sync, I've included a patch for that here. Note that the patch contains huge white space changes, making it almost impossible to read. This is because when we added the client to the module, I think the spaces were switched to drupal style.
I propose in the future that we keep the external library external and do not modify its spacing / style so that we can read diffs that come from the author.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | diff_between_stock_solrconfig_and_drupal.diff | 10.78 KB | JacobSingh |
| #8 | solr_14_and_new_solr_php_client.diff | 128.14 KB | JacobSingh |
| #3 | new_php_client_and_solr_trunk.diff | 118.14 KB | JacobSingh |
| new_php_client_and_solr_trunk.diff | 113.63 KB | JacobSingh |
Comments
Comment #1
robertdouglass commentedFor the attachments I think it might be worth it. We should at least maintain this patch.
Comment #2
JacobSingh commentedThere is a rather strange bug in the new SolrPHPClient
For some reason, even when $boost is not passed, in addField receives boost as a null (not a false) and therefor pukes on indexing.
See the backtrace
I can of course fix this with a conditional to turn null into false, but
Looks like it shouldn't be needed.
Anyone know what the deal is here? If I make null = false in that function, indexing works, if not, it fails. This needs to be fixed at the client level, so when we identify why, we should pass a patch upstream.
Comment #3
JacobSingh commentedOkay, here is another patch (which seems to work).
I had to make a few modifications to the client. After we get this in, we should consider fixing / using the client implementation of field boosts instead of re-creating it in Drupal if it makes sense.
Comment #4
JacobSingh commentedstatus change.
Comment #5
pwolanin commented@Jacob - those are index-time boosts or query-time boosts?
I doubt we will make much use of index-time boosts, especially not for individual fields (vs. the whole doc).
Comment #6
JacobSingh commentedThey are index time boosts...
I don't know if we will actually use them, but that isn't the point. The null values were creating:
<field name="title" boost="">
which was causing Solr to throw a nice cryptic error I had to search the source for :) so I just fixed that problem. We may want to have index time boosts at some point, but I don't know when and I don't know the advantages other than performance... I'm not sure if the client provides for query time boosts (don't think so).
We should get this in ASAP otherwise it will become a royal PITA to continue merging. Are you seeing any problems after applying this patch? I guess for BC sake, we should also provide the old solrconfig.xml as well. The new one contains FastLRUCache which the old one didn't, so it might not start (didn't test).
Best,
Jacob
Comment #7
vladimir.dolgopolov commentedConcerning this lines:
//@note: JacobSingh changed this to is_int because off null / false confusion
I believe
produces nothing.
We see many (float) casts in Apache_Solr_Service class. So we have to check is_float() instead of is_int().
Now fields are not boosted in xml POST.
Comment #8
JacobSingh commentedOkay, here is another go at this.
I've merged in the new stuff from the solr trunk into solrconfig.xml and also added the handler for attachments (as of yet unimplemented). It checks out and seems to work great!
I've attached a diff between our new solrconfig.xml and the one from the Solr trunk for reference as well.
Comment #9
pwolanin commentedcommitted the above as the basis for further testing and verification.
Comment #10
pwolanin commentedSomething a little odd in the patch here:
Comment #11
pwolanin commentedComment #12
pwolanin commented