Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all.
How would you do a search for a specific language in Umbraco 8?
In Umbraco 7, we just added the path to the index. And we can do the same in Umbraco 8, if we create a node tree for both languages.
But if we allow varying by culture, they share the same path. But now they have properties with culture extensions on same results.
Eksampel:
I create a node with alias home, with one property called teststring and allowed varying by culture.
When i search da or en i get these results:
__NodeId: 1062
__NodeTypeAlias: home
__Path: -1,1062
__VariesByCulture: y
nodeName: DA
nodeName_da-dk: DA
nodeName_en-us: EN
teststring_da-dk: Dansk
teststring_en-us: English
How would you do it?
You should be able to do a search om just the fields with the culture suffix you need.
Also, when Reading results, can’t you then Use the culture suffix to read the right fields?
Hi Søren.
On a fixed search where we define the fields to search in, that would be possible, and might be they way we go.
But if the fields are added dynamicly when you create new properties, then you get all results even if it is not in the language you search in.
So i am just trying to get some good ideas :)
say your content has fields like: title teaser content link
Then you'd get titleda-dk titleen-us etc...
when constructing your search result, you should/coulkd then use the fields from the doctype, and the variant/language suffix.
so, en-us => new{ title = titleen-us ... } and, da-da => new{ title = titleda-dk ... }
Does that makee sense?
I don't think the above it there out of the box
I will try and play around with it.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Lucene search for multilangual site in Umbraco 8
Hi all.
How would you do a search for a specific language in Umbraco 8?
In Umbraco 7, we just added the path to the index. And we can do the same in Umbraco 8, if we create a node tree for both languages.
But if we allow varying by culture, they share the same path. But now they have properties with culture extensions on same results.
Eksampel:
I create a node with alias home, with one property called teststring and allowed varying by culture.
When i search da or en i get these results:
__NodeId: 1062
__NodeTypeAlias: home
__Path: -1,1062
__VariesByCulture: y
nodeName: DA
nodeName_da-dk: DA
nodeName_en-us: EN
teststring_da-dk: Dansk
teststring_en-us: English
How would you do it?
You should be able to do a search om just the fields with the culture suffix you need.
Also, when Reading results, can’t you then Use the culture suffix to read the right fields?
Hi Søren.
On a fixed search where we define the fields to search in, that would be possible, and might be they way we go.
But if the fields are added dynamicly when you create new properties, then you get all results even if it is not in the language you search in.
So i am just trying to get some good ideas :)
say your content has fields like: title teaser content link
Then you'd get titleda-dk titleen-us etc...
when constructing your search result, you should/coulkd then use the fields from the doctype, and the variant/language suffix.
so, en-us => new{ title = titleen-us ... } and, da-da => new{ title = titleda-dk ... }
Does that makee sense?
I don't think the above it there out of the box
Hi Søren.
I will try and play around with it.
is working on a reply...