Currently the ApacheSolr search module doesn't pay attention to content language or any filtering options. These patches will both index that data and add a faceted search to browse by language.
You'll need to add a language field to your schema.xml:
<field name="language" type="string" indexed="true" stored="true"/>
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | apachesolr_language.5.x.patch | 4.53 KB | drunken monkey |
| #9 | apachesolr_language.5.x.patch | 6.03 KB | drunken monkey |
| #8 | apachesolr_language.5.x.patch | 5.94 KB | drunken monkey |
| as_patch2.patch | 3.32 KB | tmcw | |
| as_i18n_facet.patch | 487 bytes | tmcw |
Comments
Comment #1
robertdouglass commentedLooks exciting. Please check some whitespace issues in as_patch2.patch. Is this line extra?
+ //i18n_supported_languages()Comment #2
robertdouglass commentedMight need a re-roll.
Comment #3
robertdouglass commentedI've committed a version of this to D6. Needs backborting.
Comment #4
drunken monkeyIt seems, like there was some error, apachesolrlang.module contains exactly the same as apachesolrlang.info, which leads to an error when activating the module.
Comment #5
robertdouglass commentedYeah, I totally screwed that commit up. I fixed it right away, though. Did you try the most recent?
Comment #6
drunken monkeyI did now, it had one minor error, $type_title instead of $title at one place. Fixed and committed, and now it seems to work fine, at first glance.
I'll change the facet limit patch to cover this one as well.
Comment #7
drunken monkeyI've just added the is_array() test before the return under 'view'.
In combination with the facet limit patch this previously caused a NULL warning when the result set was empty.
But now everything should be fine, hope it's OK to set this to "fixed".
Comment #8
drunken monkeySorry, of course it was not OK, the D5 version is missing.
But as amends I took an attempt at backporting, the patch is attached and hopefully not far from right. Locally, everything seems to work.
Comment #9
drunken monkeyMy apologies, again, it seems my luck won't allow me to post a patch that is correct at the first try. This one had a bug which prevented the facet limit option to have any effect, which I just now realized.
This was wrong as well in the D6 version, but to that one I just committed a bugfix and now it should be alright.
Comment #10
drunken monkeyIs this one RTBC?
Comment #11
robertdouglass commentedIt was stupid of me to forget this for the alpha 3. Would you mind re-rolling?
Comment #12
drunken monkeyNo problem, the attached patch should be working now.
Comment #13
drunken monkeyComment #14
robertdouglass commentedThanks. I found two more places where apachesolr_facet_query_limits needed updating, added those, committed.
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.