Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Gregory 87 posts 233 karma points
    Nov 27, 2017 @ 12:48
    David Gregory
    0

    Restrict search by culture

    Hi, just starting out with this package and wondered if it is possible to restrict the search based on language?

    Site structure is

    SplashPage(root)
      -section1(en-GB)
      -section2(en-GB)
      -section3(en-GB)
      -section1(fr-FR)
      -section2(fr-FR)
      -section3(fr-FR)
    

    My search page will sit in section1(en-GB) and then the other language version in section1(fr-FR). So I set the root search node as Splash but if I am on the english pages I want to exclude fr-FR from the search.

    Is this possible? Thanks David

  • Yakov Lebski 591 posts 2347 karma points
    Nov 27, 2017 @ 19:54
    Yakov Lebski
    0

    I see 2 options:

    1. Add custom field to index what contains culture and add search query by this field
    2. Generate search query by node path, for example path start with (-1,root, x1) or (-1,root, x2) or (-1,root, x3), where x1-x3 is ids of languages page
Please Sign in or register to post replies

Write your reply to:

Draft