Re: Faceted search using Lucene 4.3

2013-05-20 Thread raj
Shai, Looks like this is what I was looking for. Will try out Thansk a lot! Rajesh On Mon, May 20, 2013 at 7:27 PM, Shai Erera wrote: > Raj, > > If I understand your question, you can integrate regular and faceted search > as follows: > > Query q = new TermQuery("f", "word"); > TopDocsCollec

Re: Faceted search using Lucene 4.3

2013-05-20 Thread Shai Erera
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 topDoc

Re: Faceted search using Lucene 4.3

2013-05-20 Thread raj
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:3

Re: Faceted search using Lucene 4.3

2013-05-15 Thread raj
Thanks a lot Shai! That was really quick response. On Thu, May 16, 2013 at 11:32 AM, Shai Erera 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://

Re: Faceted search using Lucene 4.3

2013-05-15 Thread Shai Erera
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/SimpleFac

Faceted search using Lucene 4.3

2013-05-15 Thread raj
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 Document

Re: Faceted Search using Lucene

2009-03-02 Thread Michael McCandless
s[i].reopen(); if (newReader != readers[i]) { readers[i].close(); } readers[i] = newReader; } multiReader = new MultiReader(readers); OpenBitSetFacetHitCounter facetHitCounter = newOpenBitSetFacetHitCounter(); IndexSearcher indexSearcher = new IndexSearcher(multiReader); I then us

Re: Faceted Search using Lucene

2009-03-02 Thread Amin Mohammed-Coleman
open(), and then call get() and gather each >>>>> IndexSearcher instance into a new array. Then, make a new >>>>> MultiSearcher (opposite of what I said before): while that >>>>> creates >>>>> a >>>>> small amount of ga

Re: Faceted Search using Lucene

2009-03-02 Thread Michael McCandless
Searcher)searchables[i]; readers[i] = indexSearcher.getIndexReader(); IndexReader newReader = readers[i].reopen(); if (newReader != readers[i]) { readers[i].close(); } readers[i] = newReader; } multiReader = new MultiReader(readers); OpenBitSetFacetHitCounter facetHitCounter = newOpenBitSet

Re: Faceted Search using Lucene

2009-03-02 Thread Amin Mohammed-Coleman
utltisearcher when this class is creared by >>> spring. >>> >>> >>> private synchronized void swapMultiSearcher(MultiSearcher >>> newMultiSearcher) { >>> >>> try { >>> >>> release(multiSearcher); >>> >>>

Re: Faceted Search using Lucene

2009-03-02 Thread Michael McCandless
exSearcher indexSearcher = new IndexSearcher(multiReader); I then use the indexseacher to do the facet stuff. I end the code with closing the multireader. This is causing problems in another method where I do some other search as the indexreaders are closed. Is it ok to not close the multiindexreade

Re: Faceted Search using Lucene

2009-03-02 Thread Amin Mohammed-Coleman
enBitSetFacetHitCounter(); IndexSearcher indexSearcher = new IndexSearcher(multiReader); I then use the indexseacher to do the facet stuff. I end the code with closing the multireader. This is causing problems in another method where I do some other search as the indexreaders are closed. Is

Re: Faceted Search using Lucene

2009-03-02 Thread Amin Mohammed-Coleman
>>>>>>>>> Query >>>>>>>>>>>>>>> '" >>>>>>>>>>>>>>> + >>>>>>>>>>>>>>> query.toString() +"'"); >

Re: Faceted Search using Lucene

2009-03-02 Thread Michael McCandless
ing problems in another method where I do some other search as the indexreaders are closed. Is it ok to not close the multiindexreader or should I do some additional checks in the other method to see if the indexreader is closed? Cheers P.S. Hope that made sense...! On Mon, Feb 23, 20

Re: Faceted Search using Lucene

2009-03-02 Thread Amin Mohammed-Coleman
t;>>>>>>> >>>>>>>>>>>>> throw new IllegalStateException(e); >>>>>>>>>>>>> >>>>>>>>>>>>> } >>>>>>>>>>>>> >>>>>>>>>>&

Re: Faceted Search using Lucene

2009-03-02 Thread Michael McCandless
g problems in another method where I do some other search as the indexreaders are closed. Is it ok to not close the multiindexreader or should I do some additional checks in the other method to see if the indexreader is closed? Cheers P.S. Hope that made sense...! On Mon, Feb 23, 2009

Re: Faceted Search using Lucene

2009-03-02 Thread Amin Mohammed-Coleman
gt;>>>> newMultiSearcher) { >>>>>>>>>>> >>>>>>>>>>> try { >>>>>>>>>>> >>>>>>>>>>> release(multiSearcher); >>>>>>>>>>> >&g

Re: Faceted Search using Lucene

2009-03-02 Thread Michael McCandless
der); I then use the indexseacher to do the facet stuff. I end the code with closing the multireader. This is causing problems in another method where I do some other search as the indexreaders are closed. Is it ok to not close the multiindexreader or should I do some additional checks in

Re: Faceted Search using Lucene

2009-03-02 Thread Amin Mohammed-Coleman
gt;>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> } >>>>>>>>> >>>>>>>>> >>>>>>>>> private void warm(MultiSearcher newMultiSeacher) {

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
thod where I do some other search as the indexreaders are closed. Is it ok to not close the multiindexreader or should I do some additional checks in the other method to see if the indexreader is closed? Cheers P.S. Hope that made sense...! On Mon, Feb 23, 2009 at 7:20 AM, Amin Mohamme

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
t;>> Amin Mohammed-Coleman wrote: >>>>>>>> >>>>>>>> just a quick point: >>>>>>>> >>>>>>>> public void maybeReopen() throws IOException { //D >>>>>>>> >>>>>>>>> long currentVersion

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
Hi Thanks just what I needed! Cheers Amin On 22 Feb 2009, at 16:11, Marcelo Ochoa < marcelo.oc...@gmail.com> wrote: Hi Amin: Please take a look a this blog post: http://sujitpal.blogspot.com/2007/04/lucene-search-within-search-with.html Best regards, Marcelo. On Sun

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
gt;>>>>>>>> which GC then must sweep up. >>>>>>>>>> >>>>>>>>>> -- This was something I thought about. I could move it out so >>>>>>>>>> that >>>>>>>>>&

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
Amin: Please take a look a this blog post: http://sujitpal.blogspot.com/2007/04/lucene-search-within-search-with.html Best regards, Marcelo. On Sun, Feb 22, 2009 at 1:18 PM, Amin Mohammed-Coleman < ami...@gmail.com> wrote: Hi Sorry to re send this email but I was wondering if I c

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
>>>> dangerous... eg both (or, more) will wastefully reopen the >>>>>>>>> readers. >>>>>>>>> >>>>>>>>> * You are over-incRef'ing (the reader.incRef inside the loop) -- I >>>>>>>>> don't

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
t;>>>>>> IndexReader[] readers = new IndexReader[searchables.length]; >>>>>>>> >>>>>>>> for (int i =0 ; i < searchables.length;i++) { >>>>>>>> >>>>>>>> IndexSearcher ind

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
om/2007/04/lucene-search-within-search-with.html Best regards, Marcelo. On Sun, Feb 22, 2009 at 1:18 PM, Amin Mohammed-Coleman < ami...@gmail.com> wrote: Hi Sorry to re send this email but I was wondering if I could get some advice on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman > wrote: Hi I am looking at building a faceted search using Lucene. I know that Solr comes with this built in, however I would like to try this by myself (something to add to my CV!). I have been looking around and I foun

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
ments. If >>>>>>>> I >>>>>>>> don't >>>>>>>> reopen i'm concerned that the facet hit counter won't be updated. >>>>>>>> >>>>>>>> On Tue, Feb 24, 2009 at 8:32 PM, Amin Mohammed-Colem

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
>>>>>>>> >>>>>>>> IndexReader[] readers = new IndexReader[searchables.length]; >>>>>>>> >>>>>>>> for (int i =0 ; i < searchables.length;i++) { >>>>>>>> >>>>>&g

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
th.html Best regards, Marcelo. On Sun, Feb 22, 2009 at 1:18 PM, Amin Mohammed-Coleman < ami...@gmail.com> wrote: Hi Sorry to re send this email but I was wondering if I could get some advice on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman > wrote: Hi I am lo

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
er = new MultiReader(readers); >>>>>> >>>>>> OpenBitSetFacetHitCounter facetHitCounter = >>>>>> newOpenBitSetFacetHitCounter(); >>>>>> >>>>>> IndexSearcher indexSearcher = new IndexSearcher(multiReader);

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
exSearcher indexSearcher = new IndexSearcher(multiReader); >>>>> >>>>> >>>>> I then use the indexseacher to do the facet stuff. I end the code with >>>>> closing the multireader. This is causing problems in another method >>>&g

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
2009 at 1:18 PM, Amin Mohammed-Coleman < ami...@gmail.com> wrote: Hi Sorry to re send this email but I was wondering if I could get some advice on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman > wrote: Hi I am looking at building a faceted search usi

Re: Faceted Search using Lucene

2009-03-01 Thread Amin Mohammed-Coleman
t;>> >>> >>> Cheers >>> >>> >>> P.S. Hope that made sense...! >>> >>> >>> On Mon, Feb 23, 2009 at 7:20 AM, Amin Mohammed-Coleman >> >wrote: >>> >>> Hi >>>> >>>> Thanks just

Re: Faceted Search using Lucene

2009-03-01 Thread Michael McCandless
on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman wrote: Hi I am looking at building a faceted search using Lucene. I know that Solr comes with this built in, however I would like to try this by myself (something to add to my CV!). I have been looking around and I fo

Re: Faceted Search using Lucene

2009-02-26 Thread Amin Mohammed-Coleman
>> >>>>>>> question and I was wondering if I could get some help. I have a >>>>>>>> list of >>>>>>>> IndexSearchers which are used in a MultiSearcher class. I use the >>>>>>>> indexsearchers to get e

Re: Faceted Search using Lucene

2009-02-26 Thread Amin Mohammed-Coleman
>>>> readers[i] = indexSearcher.getIndexReader(); >>>>>>> >>>>>>> IndexReader newReader = readers[i].reopen(); >>>>>>> >>>>>>> if (newReader != readers[i]) { >>>>>>> >>>&

Re: Faceted Search using Lucene

2009-02-26 Thread Amin Mohammed-Coleman
t;>>>> >>>>>> OpenBitSetFacetHitCounter facetHitCounter = >>>>>> >>>>>> newOpenBitSetFacetHitCounter(); >>>>> >>>>> >>>>>> IndexSearcher indexSearcher = new IndexSearcher(multiReader); >>

Re: Faceted Search using Lucene

2009-02-26 Thread Michael McCandless
but I was wondering if I could get some advice on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman > wrote: Hi I am looking at building a faceted search using Lucene. I know that Solr comes with this built in, however I would like to try this by myself (something

Re: Faceted Search using Lucene

2009-02-26 Thread Amin Mohammed-Coleman
the indexreader is closed? >>>> >>>> >>>> >>>> Cheers >>>> >>>> >>>> P.S. Hope that made sense...! >>>> >>>> >>>> On Mon, Feb 23, 2009 at 7:20 AM, Amin Mohammed-Coleman < >&g

Re: Faceted Search using Lucene

2009-02-26 Thread Michael McCandless
to re send this email but I was wondering if I could get some advice on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman wrote: Hi I am looking at building a faceted search using Lucene. I know that Solr comes with this built in, however I would like to try this by

Re: Faceted Search using Lucene

2009-02-26 Thread Amin Mohammed-Coleman
> > > > > > > > > On Mon, Feb 23, 2009 at 7:20 AM, Amin Mohammed-Coleman < > ami...@gmail.com > > >wrote: > > > > > >> Hi > > >> > > >> Thanks just what I needed! > > >> > > >> Cheer

Re: Faceted Search using Lucene

2009-02-25 Thread Michael Stoppelman
gt; >> Cheers > >> Amin > >> > >> > >> On 22 Feb 2009, at 16:11, Marcelo Ochoa > wrote: > >> > >> Hi Amin: > >>> Please take a look a this blog post: > >>> > >>> > http://sujitpal.blogspot.co

Re: Faceted Search using Lucene

2009-02-24 Thread Amin Mohammed-Coleman
http://sujitpal.blogspot.com/2007/04/lucene-search-within-search-with.html >>> Best regards, Marcelo. >>> >>> On Sun, Feb 22, 2009 at 1:18 PM, Amin Mohammed-Coleman >>> wrote: >>> >>>> Hi >>>> >>>> Sorry to re send this email b

Re: Faceted Search using Lucene

2009-02-24 Thread Amin Mohammed-Coleman
could get some >>> advice >>> on this. >>> >>> Cheers >>> >>> Amin >>> >>> On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman >>> wrote: >>> >>> Hi >>>> >>>> I am looking at bu

Re: Faceted Search using Lucene

2009-02-22 Thread Amin Mohammed-Coleman
> wrote: Hi Sorry to re send this email but I was wondering if I could get some advice on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman wrote: Hi I am looking at building a faceted search using Lucene. I know that Solr comes with this built in, however I wo

Re: Faceted Search using Lucene

2009-02-22 Thread Marcelo Ochoa
me advice > on this. > > Cheers > > Amin > > On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman wrote: > >> Hi >> >> I am looking at building a faceted search using Lucene. I know that Solr >> comes with this built in, however I would like to try thi

Re: Faceted Search using Lucene

2009-02-22 Thread Amin Mohammed-Coleman
Hi Sorry to re send this email but I was wondering if I could get some advice on this. Cheers Amin On 16 Feb 2009, at 20:37, Amin Mohammed-Coleman wrote: Hi I am looking at building a faceted search using Lucene. I know that Solr comes with this built in, however I would like to

Faceted Search using Lucene

2009-02-16 Thread Amin Mohammed-Coleman
Hi I am looking at building a faceted search using Lucene. I know that Solr comes with this built in, however I would like to try this by myself (something to add to my CV!). I have been looking around and I found that you can use the IndexReader and use TermVectors. This looks ok but I'