Download & Extend

i18n Support in ApacheSolr + Language Faceted Search

Project:Apache Solr Search Integration
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

AttachmentSizeStatusTest resultOperations
as_i18n_facet.patch487 bytesIgnored: Check issue status.NoneNone
as_patch2.patch3.32 KBIgnored: Check issue status.NoneNone

Comments

#1

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

#2

Might need a re-roll.

#3

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.

#4

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.

#5

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

#6

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.

#7

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

#8

Status:fixed» needs review

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.

AttachmentSizeStatusTest resultOperations
apachesolr_language.5.x.patch5.94 KBIgnored: Check issue status.NoneNone

#9

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.

AttachmentSizeStatusTest resultOperations
apachesolr_language.5.x.patch6.03 KBIgnored: Check issue status.NoneNone

#10

Is this one RTBC?

#11

Status:needs review» needs work

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

#12

No problem, the attached patch should be working now.

AttachmentSizeStatusTest resultOperations
apachesolr_language.5.x.patch4.53 KBIgnored: Check issue status.NoneNone

#13

Status:needs work» needs review

#14

Status:needs review» fixed

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

#15

Status:fixed» closed (fixed)

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