Copied to clipboard

Flag this post as spam?

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


  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Sep 26, 2016 @ 12:55
    Dennis Adolfi
    1

    Searching with Vorto.

    Hi. First of, thanks for a great package, its my first time using it and it fits my clients need perfect.

    How do I search on Vorto values? Is there a search package avalible (like ezSearch) that can handle Vorto searching or can I tweak Examine to be able to fix this?

    I tried the build-in @Umbraco.TypedSearch() but that does´nt seem to fix it, since I get results from all my language vorto-properties no mather what language my current site is. Also if i search for example "values" i get a searchresult for every node in my entire installation, and that does´nt seem right. Is there a way to pass in a culture in a search method or is there a way of searching with RawQuery or regular expression?

    I googled a bit the closest i can find is: http://24days.in/umbraco/2015/hacking-around-with-search-and-strong-typed-models/ by James Jackson-South, is this the recommended approach? The article is not very commented and the term "Hacking" made me a bit scared. :) Also reading it made my head hurt. :) Quite complex and a lot of code to achive something quite standard as a searchfunction.

    Surely i cant be the first one of all the 3.000 Vorto downloads that needs a searchfunction, does anyone want to share how they fixed it? Maybe some code example?

    Again, thank you for a awesome package!

    / Dennis

  • Jonathan Richards 288 posts 1742 karma points MVP
    Sep 26, 2016 @ 15:27
    Jonathan Richards
    1

    Hey Dennis

    Your not the first, I to use Vorto, but in my case with wrapping Archetype and searching is a pain. I did bring up this subject at Code Cabin (Making sure I was in-front of such alumnis as people like Matt Brailsford) and the collective feedback wasn't very positive.

    The problems, as I see it:-

    1. Need to investigate language specific lucene databases. I got mixed results whether lucene can handle multi-language queries within the same database, or require different language specific databases. eg. A Turkish Lucene database for storing and querying Turkish specific queries - I'm aware different languages have different rules on matching for example.

    2. If requiring different Lucene database how to generate them automatically using code, and not using config files. Again nobody at Code Cabin had any experience of this.

    3. Seeding these databases with data. Really, this seems to be some sort of manual programming process completed after every published content node event. I'm guessing you have some sort of data access layer that splits out the vorto values depending on some language value. Well reusing that layer to create Lucene values in your specific language databases.

    As you can tell, I'm at the position, that I've given it some thought, but as yet, haven't coded anything. And this comes the big reason why not; Vorto will be dead in Umbraco 8, and so I'd rather spend my time writing something when 8 is released and 1-1 multi language becomes part of the core.

    Sorry for being of little help. Just wanted to reach out and say, if you find out anything, I would love to hear about it.

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Sep 27, 2016 @ 06:21
    Dennis Adolfi
    1

    Hi Jonathan!

    Yes I have a similar situation like you, but i use Nested Content instead of Archetype. Thank you so much for reaching out, I was starting to think that I was going crazy, searching everywhere and posting questions on Our and twittering whitout a single respone on a subject that feels like every site using Vorto should have.

    I have no problem "hacking" up my own temporary searchfunction until Umbraco 8, as long as I know that im not missing a obvious solution or package. It makes sense that Vorto will be dead in Umbraco 8, since 1-1 multi language will be a Umbraco standard.

    Thank you a lot for your response Jonathan!

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 03, 2016 @ 12:32
    Jeroen Breuer
    104

    Hello,

    I've updated the 1-1 multilingual example with search. The Vorto values are indexed per language.

    It's using option 3 from Jonathan Richards his post.

    When you check the source code it probably seems a bit complicated, but let me try to explain it.

    1. In the ExternalIndexerGatheringContentData event we can do some logic after each node has been saved and published. In here we're going get all the content per language and store it in a field.
    2. In the ExtractForExamine method we iterate over all the node properties and decide per property what needs to be indexed. This happens per property type.
    3. For Vorto we know we only need to fetch the content for a specific language. Inside Vorto is Nested Content which contains properties too. All the extract logic works with IPublishedContent so we can also extract the Nested Content properties.
    4. Once we've got all properties indexed per language we can build an Examine query which only searches in the current language.

    When V8 is released it's better to use that 1-1 multilingual version of course, but that will probably still take a couple of months. Until then hopefully this example works.

    You can see all the changes that I made for Vorto search here: https://github.com/jbreuer/1-1-multilingual-example/commits/master

    Jeroen

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Oct 03, 2016 @ 14:04
    Dennis Adolfi
    1

    Wow, thank you so much Jeroen! This works perfect for me!

    What a awesome community this is!

  • Osman Coskun 170 posts 404 karma points
    Dec 07, 2019 @ 08:16
    Osman Coskun
    0

    Hello,

    I built a setup based 1-1 multilingual example where i use doctype grid editors inside grid. I use vorto for text containing doctypes. It works very well. In the grid site editor adds images, videos once and text content with doc type grid editor containing vorto as attached.

    enter image description here

    The problem is when i try to make site search i can not filter results in current language since the raw grid data contains vorto fields. I examined 1-1 multilanguage example extract classes. They don't fit to my setup.

    I need to index grid data with respect to each language as you did on Umbraco.Extensions or implement something similar to Ismael's solution .

    Any helps?

    Thanks in advance...

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 16, 2016 @ 08:22
    Jeroen Breuer
    0

    I blogged about how you can search with Vorto. It also has a working example: http://24days.in/umbraco-cms/2016/umbraco-edge-case-stories/#search

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft