4 Replies Latest reply on Sep 18, 2012 3:47 AM by 930356

    Is there a way to  match property or dimension has multiple values?

      I have Endeca records indexed from database. Each record will have:
      ID, Name, CategoryID, CategoryName.... Each record may belong to multiple category. So after reindex, the record looks like the following:
      Name: Name 1
      CategoryName: Cat Name 2
      CategoryName: Cat Name 1

      My question is "is there a way I can know categoryID:1 is matching categoryName: Cat Name 1, and categoryID:2 is matching categoryName: Cat Name 2"?
        • 1. Re: Is there a way to  match property or dimension has multiple values?
          I would be interested to know if this was possible, too.
          • 2. Re: Is there a way to  match property or dimension has multiple values?

            There are a couple of ways to accomplish this that I've used. There may be others that I have not seen or considered.

            First is to create records with this category information and use RRN to combine the two. However, RRN may have licensing issues.
            So, you would have something like the book example:
            BookName: Freakonomics
            AuthorIds: 1, 2
            RecordType: Book

            AuthorId: 1
            AuthorName: Stephen Dubner
            RecordType: Author

            AuthorId: 2
            AuthorName: Steven Levitt
            RecordType: Author

            Then it's a standard RRN exercise to combine the books and authors at query time.

            The second approach is to create what I call aggregated or complex properties where you combine the subfields that are associated.
            Name: abc
            Category_Combined: CatId1<DELIM>CatName1
            Category_Combined: CatId2<DELIM>CatName2

            Your app code would have to split out the Category_Combined property into the sub-fields for display.

            Now, if you don't want to have CatId a searchable field, put a non-searchable character in front of it and configure it in your Search Characters. For example, choose some ASCII code that cannot be entered directly from a keyboard. Thus your property becomes:
            Category_Combined: <FunkyChar>CatId1<DELIM>CatName1

            This adds complexity to your pipeline code in that it has to create the concatenated fields and on your app code for searching, splitting, etc. But it works.

            • 3. Re: Is there a way to  match property or dimension has multiple values?
              Michael Peel-Oracle
              You need to use a hierarchical dimension for your category structure - this will keep the relationship between levels. Your category hierarchy (aka taxonomy) will exist somewhere as a hierarchical structure - extract it as such from there, then use the Product Catalog Integration Module to read this in as a hierarchical dimension. The other alternative is to create one directly in Developer Studio, use a leaf node with a synonym of the lowest level category id, the parents/ancestors/levels above all then get handled by Endeca automatically.

              If you must keep your category structure unstructured, then add additional properties of id=name and check via web application logic. You really should use a hierarchical structure though, as otherwise you get into other issues (specifically if you have multiple category paths, how do you know which category level 2 belongs to which category level 1?).

              • 4. Re: Is there a way to  match property or dimension has multiple values?

                We've actually used the "combine" method for one of the solutions. And it works a treat for the display part...

                But now we've been given another requirement...

                Let's say the data is llike this for each record:

                P_Word: def
                P_Word: abc
                P_WordRank: 1
                P_WordRank: 4

                They want to be able to sort records in a search via the P_WordRank value corresponding to the P_Word that it matched first/best.

                Is this even possible?

                We cannot turn any of these properties into dimensions with a hierarchy either. If we tried combining them, wouldn't the sort also include the keyword in?

                P_Combined: abc|4
                P_Combined: def|1