Subversion Repositories SmartDukaan

Rev

Rev 12139 | Rev 16289 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12139 Rev 16288
Line 394... Line 394...
394
		
394
		
395
		
395
		
396
		NodeList nodes = null;
396
		NodeList nodes = null;
397
		try {
397
		try {
398
			nodes = (NodeList) this.xpath.evaluate(resultDocsPath, this.inputSource, XPathConstants.NODESET);
398
			nodes = (NodeList) this.xpath.evaluate(resultDocsPath, this.inputSource, XPathConstants.NODESET);
-
 
399
			System.out.println("In nodes");
399
		}
400
		}
400
		catch (XPathExpressionException xpee) {
401
		catch (XPathExpressionException xpee) {
-
 
402
			System.out.println("Exception In nodes");
401
			return null;
403
			return null;
402
		}
404
		}
403
		
405
		
404
		if(nodes.getLength() == 0) {
406
		if(nodes.getLength() == 0) {
-
 
407
			System.out.println("Nodes length is zero");
405
			return null;
408
			return null;
406
		}
409
		}
407
		
410
		
408
		for(int i=0; i<nodes.getLength(); i++) {
411
		for(int i=0; i<nodes.getLength(); i++) {
409
			Node node = nodes.item(i);
412
			Node node = nodes.item(i);
Line 696... Line 699...
696
		 */
699
		 */
697
    	String[] facetDefIDs = new String[] {"Category","F_50002","F_50001",  "F_50006", "F_50007" };
700
    	String[] facetDefIDs = new String[] {"Category","F_50002","F_50001",  "F_50006", "F_50007" };
698
    	//String[] facetLabels = new String[] {"Category","Price", "Brand", "Data Connectivity", "Camera Resolution"	};
701
    	//String[] facetLabels = new String[] {"Category","Price", "Brand", "Data Connectivity", "Camera Resolution"	};
699
 
702
 
700
    	
703
    	
701
    	String[] fqrys = {};
704
    	String[] fqrys = {"F_50001:Nokia", "F_50001:Amzer"};
702
		SolrSearchService search = new SolrSearchService("nokia", fqrys, 0 , 20, null, null, null, -1, true);
705
		SolrSearchService search = new SolrSearchService("nokia", fqrys, 0 , 20, null, null, null, -1, true);
703
    	
706
    	
704
    	long[] entityIDs = search.getResultEntityIDs();
707
    	long[] entityIDs = search.getResultEntityIDs();
705
    	log.info("entityIDs=" + Arrays.toString(entityIDs));
708
    	log.info("entityIDs=" + Arrays.toString(entityIDs));
706
    	
709
    	
707
    	String[] entityNames = search.getResultEntityNames();
710
    	String[] entityNames = search.getResultEntityNames();
708
    	log.info("entityNames=" + Arrays.toString(entityNames));
711
    	log.info("entityNames=" + Arrays.toString(entityNames));
709
    	search.getFacetMap();
712
    	search.getFacetMap();
710
    	
713
    	
711
    	search.getResultMap();
714
    	System.out.println(search.getResultMap());
712
    	search.getRangeQueryResultMap();
715
    	System.out.println(search.getRangeQueryResultMap());
713
    	search.getPriceStatsMap(new InputSource());
716
    	search.getPriceStatsMap(new InputSource());
714
    	search.getTotalResults();
717
    	System.out.println(search.getTotalResults());
715
       	for (int i=0; i<facetDefIDs.length; i++) {
718
       	for (int i=0; i<facetDefIDs.length; i++) {
716
       		search.getFacetCounts(facetDefIDs[i]);
719
       		search.getFacetCounts(facetDefIDs[i]);
717
       		search.getFacetValues(facetDefIDs[i]);
720
       		search.getFacetValues(facetDefIDs[i]);
718
       	}
721
       	}
719
       	
722