Copied to clipboard

Flag this post as spam?

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


  • Poornima Nayar 106 posts 276 karma points MVP 5x c-trib
    Jul 10, 2017 @ 08:09
    Poornima Nayar
    0

    How to index and use the new content pickers and MNTP

    Hi,

    I am using the new MNTP to work as tags for my document type and I want to implement a filter functionality based on these tags. There can be multiple filters in the search query. I have been looking at the index and I see that the MNTP stores values as umb://document/xxxxxxxx . Whats the best way to store and query the index in this case to achieve filtering?

    Poornima

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Jul 10, 2017 @ 08:16
    Ismail Mayat
    0

    Poornima,

    How does it store multiple values as a csv list? I would look at may be using gathering node data and then either create a new field and get the values. if they are csv then split on string. Then I would look at extracting out the guids from the urls and storing those as space separated list.

    On you page with tags you can get the guid of the tag and then search on that?

    It's a good point you have here im going to update my examine course notes.

    Regards

    Ismail

  • Poornima Nayar 106 posts 276 karma points MVP 5x c-trib
    Jul 10, 2017 @ 08:31
    Poornima Nayar
    1

    Hi Ismail,

    I was going to do just what you said but I wanted to make sure that what I do is right as the entire site is more or less examine powered. I ll let you know how it goes.

    Poornima

  • Poornima Nayar 106 posts 276 karma points MVP 5x c-trib
    Jul 17, 2017 @ 12:36
    Poornima Nayar
    1

    Hi Ismail,

    Sorry for delayed response. This is what I finally got to.

     if (e.Fields.ContainsKey("category"))
                            {
                                e.Fields.Add(
                                    "categories-combined",
                                    string.Concat(e.Fields["category"].Replace("umb://document/", string.Empty), " "));
                            }
    

    I also wanted to ask you one more thing. Is it a good practice to further select from search results using LINQ once I have the search results?

    Poornima

  • The Cogworks 3 posts 394 karma points
    Jul 17, 2017 @ 15:22
    The Cogworks
    0

    Poornima,

    Try and avoid using extra linq statements at end use the examine itself to filter as it will be much quicker.

    Regards

    Ismail

  • Poornima Nayar 106 posts 276 karma points MVP 5x c-trib
    Jul 17, 2017 @ 21:14
    Poornima Nayar
    0

    Hi Ismail,

    What I wanted to to was get the search results and I am interested in particular fields from the set.

    say for eg i need to get a list of document types "xyz". from that list I need all fields of type "abc".

    Poornima

Please Sign in or register to post replies

Write your reply to:

Draft