Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
See the title
Comment | File | Size | Author |
---|---|---|---|
#30 | 394728.patch | 6.4 KB | mkalkbrenner |
See the title
Comment | File | Size | Author |
---|---|---|---|
#30 | 394728.patch | 6.4 KB | mkalkbrenner |
Comments
Comment #1
JacobSingh CreditAttribution: 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 CreditAttribution: brainski commentedI'm also interested! :-)
Comment #3
pwolanin CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: pwolanin commentedThe current code supports facets on nulls via, e.g.
-language:[* TO *]
Comment #6
toemaz CreditAttribution: toemaz commentedSubscribing
Comment #7
timdeeson CreditAttribution: 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 CreditAttribution: pwolanin commentedThat shoudl be the same as search current language + language neutral?
Comment #9
ayalon CreditAttribution: ayalon commentedThis is still an issue.
Best solution might be:
current selected language + language neutral
Comment #10
robertDouglass CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: robertDouglass commentedthe code from Pasqualle is straightforward:
That's the entire module.
Also noted is that the breadcrumbs are incorrect:
Comment #13
robertDouglass CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: pwolanin commentedDrupal 7 field.module has:
so 'zxx'
Comment #17
robertDouglass CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: pwolanin commentedYes, unfortunately Druapl 7 core change from zxx to und, so we changed to match.
Comment #22
jpmckinney CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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