Closed (fixed)
Project:
Apache Solr Multilingual
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Mar 2009 at 22:47 UTC
Updated:
19 Jul 2010 at 15:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
JacobSingh commentedActually a little complex (and annoying) because it appears that searching for a null value is not possible from initial investigation (will dig more). Patch is 90% complete. Will post today.
-J
Comment #2
brainski commentedI'm also interested! :-)
Comment #3
pwolanin commentedThe easy way to handle this (I think) is to make sure to always index some value (not NULL) for language - i.e. something that's never a language code like the string 'neutral' or 'empty'.
Comment #4
ayalon commentedDear JakobSingh
Thanks for your effort on this issue. Did you make any progress on this issue?
Thanks for a short feedback. Maybe I can help you with this, because I need to implement this feature too.
Greets
Comment #5
pwolanin commentedThe current code supports facets on nulls via, e.g.
-language:[* TO *]Comment #6
toemaz commentedSubscribing
Comment #7
timdeeson commentedThis would be really useful to a couple of our clients.
Their ideal scenario is that results are returned from the user's current language but if a piece of content hasn't been translated then it returns results from the site's default language.
Their scenario is that only 20% of the site content is translated, so ideally search looks for content in the user's own language but falls back where that's not available. Not sure if that is an additional complication on the current issue.
Thanks
Comment #8
pwolanin commentedThat shoudl be the same as search current language + language neutral?
Comment #9
ayalon commentedThis is still an issue.
Best solution might be:
current selected language + language neutral
Comment #10
robertdouglass commentedAgree that it should be current select language + language neutral. This should reflect in the languages facet block. We need a facet for language neutral, I think.
Comment #11
toemaz commentedPasqualle made a Apache Solr language filter module which you can find at http://windmill.sk/project/module/apachesolr_language_filter
Comment #12
robertdouglass commentedthe code from Pasqualle is straightforward:
That's the entire module.
Also noted is that the breadcrumbs are incorrect:
Comment #13
robertdouglass commentedAdding an empty facet to the languages block doesn't work:
From apachesolr.module function apachesolr_facet_block():
This will generate a URL with: ?filters=-language%3A[* TO *]
This doesn't work, and the logic from Pasqualle is better.
Comment #14
pwolanin commentedDrupal 7 is using a defined code for no language. That's the better approach I think, but requires reindexing.
Why doesn't facet missing work? It works for other fields.
Comment #15
robertdouglass commentedAh, that's good information. I'll look and we'll index that for no language as well. I don't know yet why the -language:[* TO *] doesn't work.
Comment #16
pwolanin commentedDrupal 7 field.module has:
so 'zxx'
Comment #17
robertdouglass commentedDefined by ISO639-2 for "No linguistic content / Not applicable". LOL. I bet that was a bikeshed discussion. "I want zzz!"
Comment #18
pwolanin commentedKind of seems like 'und' would be more correct, but whatever.
# und, for "undetermined";
# zxx, for "no linguistic content, not applicable".
http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
Comment #19
toemaz commentedI upgraded to 6.x-1.0 and apparently Pasqualle's module ApacheSolr Language Filter did not work anymore. I noticed now that the solr index contains 'und' for language independent content so I enhanced his module (see last part):
Comment #20
pasquallesubscribe
Comment #21
pwolanin commentedYes, unfortunately Druapl 7 core change from zxx to und, so we changed to match.
Comment #22
jpmckinney commentedSo, should apachesolr_search.module add a default language filter, or should we leave that to custom modules? What is the standard way of doing things in Drupal? I think it's to not add a filter, in which case this is wontfix.
Comment #23
pasquallethere should be an option in the module to filter by current (+LANGUAGE_NONE) language. Mixing different languages in search result is wrong in most cases, so multilingual sites will need this option enabled..
Comment #24
jpmckinney commentedOk, then this is a feature request.
Comment #25
mkalkbrennerI offer to solve this issue as part of Apache Solr Multilingual.
(To be honest, I start working on it right now because we need it for a project.)
Comment #26
jpmckinney commentedSounds good - thanks! Please paste the new issue number in this issue.
Comment #27
mkalkbrennerI suggest that I simply move this issue to Apache Solr Multilingual issue queue.
Comment #28
pwolanin commentedGiven the weak support for multiple languages in the base module, this probably makes sense, though we should revisit for Drupal .7
Comment #29
jpmckinney commented(Ah, yes, I forgot we can move issues between projects.) Would you like to take ownership of these issues, too?
#603362: translate node types
#436578: Translated (localized) taxonomy facet blocks
Comment #30
mkalkbrennerHere's the patch for Apachesolr Multilingual.
Comment #31
mkalkbrenner