i18n Support in ApacheSolr + Language Faceted Search

tmcw - May 30, 2008 - 18:27
Project:Apache Solr Search Integration
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

AttachmentSize
as_i18n_facet.patch487 bytes
as_patch2.patch3.32 KB

#1

robertDouglass - June 13, 2008 - 06:06

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

#2

robertDouglass - June 14, 2008 - 20:52

Might need a re-roll.

#3

robertDouglass - June 29, 2008 - 14:25
Version:5.x-1.0-beta2» 5.x-1.x-dev
Status:patch (code needs review)» active

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

#4

drunken monkey - June 29, 2008 - 15:05

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

robertDouglass - June 29, 2008 - 21:09

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

#6

drunken monkey - June 29, 2008 - 22:03

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

drunken monkey - July 3, 2008 - 18:07
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

drunken monkey - July 4, 2008 - 00:23
Status:fixed» patch (code 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.

AttachmentSize
apachesolr_language.5.x.patch5.94 KB

#9

drunken monkey - July 4, 2008 - 12:42

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.

AttachmentSize
apachesolr_language.5.x.patch6.03 KB

#10

drunken monkey - July 14, 2008 - 11:27

Is this one RTBC?

#11

robertDouglass - July 19, 2008 - 17:42
Status:patch (code needs review)» patch (code needs work)

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

#12

drunken monkey - July 19, 2008 - 23:10

No problem, the attached patch should be working now.

AttachmentSize
apachesolr_language.5.x.patch4.53 KB

#13

drunken monkey - July 19, 2008 - 23:11
Status:patch (code needs work)» patch (code needs review)

#14

robertDouglass - July 20, 2008 - 10:35
Status:patch (code needs review)» fixed

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

#15

Anonymous (not verified) - August 3, 2008 - 10:45
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.