0

I'm currently trying to create an Endeca query using the Java API for a URLENEQuery. The current query is:

collection()/record[CONTACT_ID = "xxxxx" and SALES_OFFICE = "yyyy"]

I need it to be:

collection()/record[(CONTACT_ID = "xxxxx" or CONTACT_ID = "zzzzz") and 
                     SALES_OFFICE = "yyyy"]

Currently this is being done with an ERecSearchList with CONTACT_ID and the string I'm trying to match in an ERecSearch object, but I'm having difficulty figuring out how to get the UrlENEQuery to generate the or in the correct fashion as I have above. Does anyone know how I can do this?

Mario S
  • 11,715
  • 24
  • 39
  • 47

1 Answers1

1

One of us is confused on multiple levels: Let me try to explain why I am confused:

  1. If Contact_ID and Sales_Office are different dimensions, where Contact_ID is a multi-or dimension, then you don't need to use EQL (the xpath like language) to do anything. Just select the appropriate dimension values and your navigation state will reflect the query you are trying to build with XPATH. IE CONTACT_IDs "ORed together" with SALES_OFFICE "ANDed".

  2. If you do have to use EQL, then the only way to modify it (provided that you have to modify it from the returned results) is via string manipulation.

  3. ERecSearchList gives you ability to use "Search Within" functionality which functions completely different from the EQL filtering, though you can achieve similar results by using tricks like searching only specified field (which would be separate from the generic search interface") I am still not sure what's the connection between ERecSearchList and the EQL expression above?

Having expressed my confusion, I think what you need to do is to use String manipulation to dynamically build the EQL expression and add it to the Query.

A code example of what you are doing would be extremely helpful as well.

1054211
  • 442
  • 2
  • 6