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"/>
| Attachment | Size |
|---|---|
| as_i18n_facet.patch | 487 bytes |
| as_patch2.patch | 3.32 KB |

#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
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
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
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.
#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.
#10
Is this one RTBC?
#11
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.
#13
#14
Thanks. I found two more places where apachesolr_facet_query_limits needed updating, added those, committed.
#15
Automatically closed -- issue fixed for two weeks with no activity.