This discussion is archived
10 Replies Latest reply: Dec 5, 2012 6:37 AM by 977895 RSS

Multiple queries

Terue Newbie
Currently Being Moderated
I have 3 MDEX engine for new cars , used cars and auction cars.
I want to search and get result lists for 3 MDEX within 1page?
How can I achieve this if I create the endeca application using the reference application(Discover)?
  • 1. Re: Multiple queries
    Kristen G Explorer
    Currently Being Moderated
    You will need to handle querying the three separate indexes and presenting the unified results in your application tier logic - there is nothing out of the box to do this. This shouldn't be too difficult assuming since the records aren't overlapping.
    Out of curiosity, why did you decide to use three separate indexes instead of 1?
  • 2. Re: Multiple queries
    Terue Newbie
    Currently Being Moderated
    Correction.

    There is 1 MDEX, but there are 2clustering MDX for load balance.

    What they want to do is on
    if they seach new cars, then resultlist shows new cars with old cars list and auction cars list on the right.

    Dimention
    CARs
    - Used
    - New
    - Auction

    How to do this using the reference application?
    Any advice will be appreciated.
  • 3. Re: Multiple queries
    Michael Peel Journeyer
    Currently Being Moderated
    Some questions:
    - By default the "main" results contains "new cars", and they can page through the "new cars" list, is that correct?
    - What happens to the "used cars" and "auction cars" lists when they go to subsequent pages, do they still get displayed?
    - If they do still get displayed, is it the same set of used and auction cars, or does it change at all?
    - What about navigation - does this effect a change in the sidebar navigation too?
    - Is there some kind of mechanism to switch the "main" results to "used cars" or "auction cars", and if so does "new cars" now appear on the right instead?
    - What kind of bandwidth do you have in terms of performance and current operations per second, enough to spare for additional navigation calls?

    There are a few options you can take, depending on the answers to the questions above, for example:
    1) Use business rules to return all three sets of results, setting the trigger to appear everywhere and the target to inherit navigation state, and setting each one to the type of results to be returned, e.g. Type=New, Type=Used and Type=Auction, then switch to "regular" navigation on paging/navigation etc.
    2) Make two calls, a primary call to return the main results and the navigation etc., and a light-weight call to return the two supplementary data feeds as business rules
    3) Make three calls, a primary call to return the main results and the navigation etc., and two light-weight calls (navigation switched off, setSelection to limit properties returned) to return the two supplementary data feeds as navigation results

    Michael
  • 4. Re: Multiple queries
    Terue Newbie
    Currently Being Moderated
    Some questions:
    - By default the "main" results contains "new cars", and they can page through the "new cars" list, is that correct?

    Yes, you are right. You can change main category(NEW, USED or AUCTION) from sidebar navigation on the left.

    - What happens to the "used cars" and "auction cars" lists when they go to subsequent pages, do they still get displayed?
    - If they do still get displayed, is it the same set of used and auction cars, or does it change at all?

    I need to check with my customer but even you go to the product detail page, still you will get some recomendation page
    related to the one you selected.

    - What about navigation - does this effect a change in the sidebar navigation too?
    Yes, you will see facet related on your choise.

    - Is there some kind of mechanism to switch the "main" results to "used cars" or "auction cars", and if so does "new cars" now appear on the right instead?

    As I said, there is sidebar navigation on the left.

    - What kind of bandwidth do you have in terms of performance and current operations per second, enough to spare for additional navigation calls?

    Yes, it should not be worse than the current application.
    They are thinking to have multiple MDEX for load balancing.

    Terue,
  • 5. Re: Multiple queries
    Michael Peel Journeyer
    Currently Being Moderated
    - By default the "main" results contains "new cars", and they can page through the "new cars" list, is that correct?

    Yes, you are right. You can change main category(NEW, USED or AUCTION) from sidebar navigation on the left.

    - What happens to the "used cars" and "auction cars" lists when they go to subsequent pages, do they still get displayed?
    - If they do still get displayed, is it the same set of used and auction cars, or does it change at all?

    I need to check with my customer but even you go to the product detail page, still you will get some recomendation page
    related to the one you selected.
    Let me rephrase: my question is "if you are browsing New Cars and you select Page Two, do you still see Used Cars and Auction Cars? If so, are they the same list of cars as you see on Page One?"
    - What about navigation - does this effect a change in the sidebar navigation too?
    Yes, you will see facet related on your choise.
    Again, let me rephrase: my question is what happens to the supplementary data sets when you interact with the primary data set. For example, you are browsing New Cars. You select "Number of Doors = 5". The New Cars list changes to show New Cars with five doors. Does the supplementary data sets of Used Cars and Auction Cars change as well?
    Michael
  • 6. Re: Multiple queries
    977895 Newbie
    Currently Being Moderated
    Let me answer your questions below;
    ==================================================================
    if you are browsing New Cars and you select Page Two,
    do you still see Used Cars and Auction Cars? If so, are they the same list of cars as you see on Page One?"
    ==================================================================

    If you are browsing new cars and you select Page Two,
    the following (A) or (B) will be expected. (A) would better but if (A) is not possible, (B) is also fine.

    A) On Page Two, you still see used cars and auction cars on the right.
    They are NOT the same list of cars you see on Page One.
    The different used cars and auction cars will be displayed based on a rule.(For example, the order of best match)

    B) On Page Two, you still see used cars and auction cars on the right.
    They are the same list of cars you see on Page One.

    If there is no match for keywords in used cars and auction cars, they don't need to be displayed on the right.

    ==================================================================
    my question is what happens to the supplementary data sets when you interact with the primary data set.
    For example, you are browsing New Cars. You select "Number of Doors = 5".
    The New Cars list changes to show New Cars with five doors.
    Does the supplementary data sets of Used Cars and Auction Cars change as well?
    ==================================================================

    If you are browsing New Cars and select "Number of Doors = 5", the new cars list changes to show new cars with five doors, but the list of used cars and auction cars on the right does NOT change. The navigation sidebar(facet) does not affect the list on the right(No matter which facet you select, the list of the used cars and auction cars on the right is the same.

    Yuka
  • 7. Re: Multiple queries
    977895 Newbie
    Currently Being Moderated
    ---------------------------------------------------------------------------------------------------------------
    There are a few options you can take, depending on the answers to the questions above, for example:
    1) Use business rules to return all three sets of results, setting the trigger to appear everywhere and the target to inherit navigation state, and setting each one to the type of results to be returned, e.g. Type=New, Type=Used and Type=Auction, then switch to "regular" navigation on paging/navigation etc.
    2) Make two calls, a primary call to return the main results and the navigation etc., and a light-weight call to return the two supplementary data feeds as business rules
    3) Make three calls, a primary call to return the main results and the navigation etc., and two light-weight calls (navigation switched off, setSelection to limit properties returned) to return the two supplementary data feeds as navigation results
    ---------------------------------------------------------------------------------------------------------------

    We are trying to do the option (2). Considering the answers for your questions in my previous post, is it possible to do the option (2) ?

    Yuka
  • 8. Re: Multiple queries
    Michael Peel Journeyer
    Currently Being Moderated
    Yes, option two is the right fit given your use cases, so:
    1) Create a business rule Zone with Rule Limit = "2" and Valid for Search = "True"
    2) Create a business rule Style with Min Records = "1" and Max Records = however many the business want displayed
    3) Create three business rules with Trigger = Everywhere, and each with a separate Target of Type=[Auction or New or Used], and finally ensure the sort order is set to the default
    4) Execute your request/response as usual for the primary results and use this to display navigation and "main" results, either using a record filter or a regular dimension value to limit the results to the requested primary set (New, Used or Auction)
    5) Execute a secondary, light-weight request, setting the following on your ENEQuery object:
    - setNavAllRefinements(false) - this returns as little navigation as possible
    - setNavNumERecs(0) - this returns zero "main" records
    - setNavRecordFilter("Nr=AND(OR(P-SYSTEM_Record_Type:<Auction|New|Used>,P-SYSTEM_Record_Type:<Auction|New|Used>))") - this returns the other two sets of records, and should contain whichever two aren't the primary results, note using a combination of AND and OR is better for performance than a single NOT
    - setNavERecSearches to the same as your primary (in your example, "Prius")
    - (Optional) You can also set some of the navigation selections using setNavDescriptors(<whatever-is-in-your-primary-set>) - you probably don't want all as price etc. would be different for each set, but you may want to consider the common ones like make/model, body type, number of doors, etc.

    Not sure if you are using Experience Manager or not, either way the above will fit, but you can enhance with Experience Manager to allow the business to customise the above.

    Hope this helps.

    Michael
  • 9. Re: Multiple queries
    Terue Newbie
    Currently Being Moderated
    I got additional information from Michael.

    How to setup:
    Developer Studio for (1) and (2), Workbench/Experience Manager for (3). (4) and (5) would be generated either directly via the Endeca API or wrapped inside Assembler/Experience Manager cartridges.
  • 10. Re: Multiple queries
    977895 Newbie
    Currently Being Moderated
    Thank your for your support.
    We are currently working on the option 2 with your instruction.
    If there is any further question, we will let you know.

    Yuka

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points