Raj, If I understand your question, you can integrate regular and faceted search as follows:
Query q = new TermQuery("f", "word"); TopDocsCollector tdc = TopScoreDocsCollector.create(); FacetsCollector fc = FacetsCollector.create(); searcher.search(q, MultiCollector.wrap(tdc, fc)); TopDocs topDocs = tdc.topDocs(); List<FacetResult> facetResults = fc.getFacetResults(); Shai On Mon, May 20, 2013 at 4:46 PM, raj <rajeshmohan.1...@gmail.com> wrote: > Is it possible to combine normal Lucene search and Facet Search? > > I have seperately implemented basic search and also Faceted Search in my > project based on the sample provided. But a bit confused on how to query > the document content which also has associated Facets. > > > On Thu, May 16, 2013 at 11:34 AM, raj <rajeshmohan.1...@gmail.com> wrote: > > > Thanks a lot Shai! That was really quick response. > > > > > > On Thu, May 16, 2013 at 11:32 AM, Shai Erera <ser...@gmail.com> wrote: > > > >> Hi Raj, > >> > >> Unfortunately the userguide is outdated after refactorings made to the > >> package. We have an issue open to fix that. > >> Until then, you can find an example code here: > >> > >> > https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_3/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleFacetsExample.java > >> > >> In general, the object you are looking for is now called FaceFields. > >> > >> Shai > >> > >> > >> On Thu, May 16, 2013 at 8:44 AM, raj <rajeshmohan.1...@gmail.com> > wrote: > >> > >> > Hi, > >> > > >> > I was checking on Lucene Faceted search and need some guidance. > >> > > >> > > >> > http://lucene.apache.org/core/4_3_0/facet/org/apache/lucene/facet/doc-files/userguide.html#facet_indexingmentions > >> > about > >> > > >> > DocumentBuilder categoryDocBuilder = new > >> CategoryDocumentBuilder(taxo); > >> > > >> > But I am unable to find DocumentBuilder and CategoryDocumentBuilder > >> classes > >> > in lucene-facet-4.3.0.jar. Most of the online tutorials that I could > >> find > >> > also mentions the same steps as in official doc > >> > These are present in an old version - > >> > > >> > > >> > http://lucene.apache.org/core/old_versioned_docs/versions/3_4_0/api/contrib-facet/org/apache/lucene/DocumentBuilder.html > >> > > >> > What are the equivalent ones in 4.3? Or any help in getting this > >> > implemented in 4.3? > >> > > >> > Thanks, > >> > Rajesh > >> > > >> > > > > >