Uploaded image for project: 'Bobo'
  1. BOBO-102

Multiple BrowseSelections based on MultiValueFacetHandler result in zero results

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects versions: 3.0.2
    • Fix versions: 3.1.0
    • Components: core
    • Labels:
      None
    • Sprint:

      Description

      When I add two BrowseSelections for Facets based on
      MultiValueFacetHandler, I get zero results.

             <bean id="categoryFacet" 
      class="com.browseengine.bobo.facets.impl.MultiValueFacetHandler" 
      parent="facetHandler"> 
                      <constructor-arg value="category" type="java.lang.String"/> 
                      <constructor-arg value="category.id" type="java.lang.String"/> 
              </bean> 
              <bean id="cityFacet" 
      class="com.browseengine.bobo.facets.impl.MultiValueFacetHandler" 
      parent="facetHandler"> 
                      <constructor-arg value="city" type="java.lang.String"/> 
                      <constructor-arg value="city.id" type="java.lang.String"/> 
              </bean> 
      

      When I turn them into SimpleFacetHandler I get normal results

              <bean id="categoryFacet" 
      class="com.browseengine.bobo.facets.impl.SimpleFacetHandler" 
      parent="facetHandler"> 
                      <constructor-arg value="category" type="java.lang.String"/> 
                      <constructor-arg value="category.id" type="java.lang.String"/> 
              </bean> 
              <bean id="cityFacet" 
      class="com.browseengine.bobo.facets.impl.SimpleFacetHandler" 
      parent="facetHandler"> 
                      <constructor-arg value="city" type="java.lang.String"/> 
                      <constructor-arg value="city.id" type="java.lang.String"/> 
              </bean> 
      
      BoboIndexReader boboReader = BoboIndexReader.getInstance(reader,handlerList); 
      
      BrowseRequest br=new BrowseRequest(); 
      br.setCount(10); 
      br.setOffset(0); 
      
      BrowseSelection sel=new BrowseSelection("city"); 
      sel.addValue("10"); 
      br.addSelection(sel); 
      
      BrowseSelection sel=new BrowseSelection("category"); 
      sel.addValue("15"); 
      
      br.addSelection(sel); 
      
      QueryParser parser = new QueryParser("contents",new 
      StandardAnalyzer(Version.LUCENE_CURRENT)); 
      Query q=parser.parse("cool car"); 
      br.setQuery(q); 
      
      FacetSpec catSpec = new FacetSpec(); 
      catSpec.setOrderBy(FacetSortSpec.OrderValueDesc); 
      catSpec.setMaxHitCount(20); 
      
      FacetSpec citySpec = new FacetSpec(); 
      citySpec.setMinHitCount(1); 
      citySpec.setOrderBy(FacetSortSpec.OrderHitsDesc); 
      
      br.setFacetSpec("category",catSpec); 
      br.setFacetSpec("city",citySpec); 
      SortField sort = new SortField("sortDate",SortField.LONG,true); 
      br.setSort(new SortField[]{sort}); 
      
      

      I'm using Bobo Browse 3.0.1/Lucene 3.5

        Attachments

          Activity

            People

            • Assignee:
              wonlay Lei Wang
              Reporter:
              mschipperheyn Marc Schipperheyn
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: