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"/>

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robertDouglass’s picture

Looks exciting. Please check some whitespace issues in as_patch2.patch. Is this line extra? + //i18n_supported_languages()

robertDouglass’s picture

Might need a re-roll.

robertDouglass’s picture

Version: 5.x-1.0-beta2 » 5.x-1.x-dev
Status: Needs review » Active

I've committed a version of this to D6. Needs backborting.

drunken monkey’s picture

It seems, like there was some error, apachesolrlang.module contains exactly the same as apachesolrlang.info, which leads to an error when activating the module.

robertDouglass’s picture

Yeah, I totally screwed that commit up. I fixed it right away, though. Did you try the most recent?

drunken monkey’s picture

I 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.

drunken monkey’s picture

Status: Active » Fixed

I'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".

drunken monkey’s picture

Status: Fixed » Needs review
FileSize
5.94 KB

Sorry, 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.

drunken monkey’s picture

My 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.

drunken monkey’s picture

Is this one RTBC?

robertDouglass’s picture

Status: Needs review » Needs work

It was stupid of me to forget this for the alpha 3. Would you mind re-rolling?

drunken monkey’s picture

No problem, the attached patch should be working now.

drunken monkey’s picture

Status: Needs work » Needs review
robertDouglass’s picture

Status: Needs review » Fixed

Thanks. I found two more places where apachesolr_facet_query_limits needed updating, added those, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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