5 Replies Latest reply on Apr 14, 2012 8:04 AM by sameerdh

    constructing ENEQuery

      Hi all,

      I'm facing problems while creating ENEQuery.....Constructed Query results is showing all items even if i select the dimension.

      I Created query by creating an instance of ENEQuery and added params like N NE and Ntt Ntk Ntx

      But if i use the same params in ref app im getting all results...

      Ref app constructs like &Ntx=mode+matchall &Ntk=All &Ne=10002 &N=4294967233 &Ntt=pant

      Is there any way we can construct the order of params similar to reference app ?

      I'm using JAVA.Your help will be appreciated.

        • 1. Re: constructing ENEQuery
          Hi Sameer - do you have a code snippet for adding the dimension value to your query object? It's a bit tricky in Java to set these...
          • 2. Re: constructing ENEQuery
            Thanks tim for your reply.... and sorry for late response...

            See my attached ... code snippet..... we are constructing params based on ref app... not sure this is the standard way...

            public UrlENEQuery generateKeywordQuery(HttpServletRequest pRequest,
                           UrlFormatter urlFormatter, QueryBuilder pQueryBuilder,String pQuestion)
                           throws UrlFormatException, QueryBuildException,
                           UrlENEQueryParseException {
                      UrlState urlState = urlFormatter.parseRequest(pRequest);
                      // holds keyword Query.
                      UrlENEQuery keywordQuery = (UrlENEQuery) pQueryBuilder.buildQuery(urlState);
                      if (keywordQuery.containsDimSearchQuery()) {// enable compound dimension search
                           // set the navigation state for the query if this is a "search within" based on the navigation descriptors
                      if(pRequest.getParameter("rootDim") != null &&
                                pRequest.getParameter("dimension") != null){
                      // change once pagination is developed.
                      if (keywordQuery.containsNavQuery()) {     // enable did you mean search
                      return keywordQuery;
            • 3. Re: constructing ENEQuery
              Mandar Shastrakar
              Query generation seems correct. What error you are getting?

              • 4. Re: constructing ENEQuery
                Could it be that your params are backwards:
                should be
                • 5. Re: constructing ENEQuery
                  You are right tim...

                  it worked for me after replacing parameters.

                  thanks once again... :)