Re: FieldSelector with Lucene 2.3.2

2011-03-17 Thread Chris Bamford
Thanks David, I realised my mistake after I sent the original mail. Kind regards - Chris -Original Message- From: David Causse To: java-user@lucene.apache.org Sent: Thu, 17 Mar 2011 11:22 Subject: Re: FieldSelector with Lucene 2.3.2 On Wed, Mar 16, 2011 at 03:17:41PM +

Re: FieldSelector with Lucene 2.3.2

2011-03-17 Thread David Causse
On Wed, Mar 16, 2011 at 03:17:41PM +, Chris Bamford wrote: > Hi > > I am trying to speed up access to the data in my results Documents > and was wondering if FieldSelector might be the way forward? > After my search, I end up with an ArrayList of Documents, from each >

FieldSelector with Lucene 2.3.2

2011-03-16 Thread Chris Bamford
Hi I am trying to speed up access to the data in my results Documents and was wondering if FieldSelector might be the way forward?After my search, I end up with an ArrayList of Documents, from each of which I need to extract certain fields and their values as key/value pairs in a HashMap

Re: FieldSelector

2009-02-16 Thread Erick Erickson
Depending upon the structure of your index, FieldSelector can make a dramatic difference in your query speed. I wrote up some data peculiar to my setup, I think if you search FieldSelector on the Wiki you can find it. Best Erick On Mon, Feb 16, 2009 at 7:00 AM, wrote: > Hi, > > wha

Re: FieldSelector

2009-02-16 Thread Grant Ingersoll
On Feb 16, 2009, at 7:00 AM, wrote: Hi, what kind of fields loads IndexSearcher.Document doc(int i)? Only those with Field.Store.YES? Yes, Lucene can only load those fields that are stored. I'm asking because I do not need to load the tokens - should I use a FieldSelector o

FieldSelector

2009-02-16 Thread spring
Hi, what kind of fields loads IndexSearcher.Document doc(int i)? Only those with Field.Store.YES? I'm asking because I do not need to load the tokens - should I use a FieldSelector or are these fields not loaded? Than

Re: FieldSelector

2007-12-05 Thread Grant Ingersoll
n it might make sense to lazily load just those fields. I don't see much value in loading all the fields lazily, but it certainly is easy enough to do w/ the SetBasedFieldSelector or a trivial implementation of FieldSelector where the accept method returns Lazy no matter the

Re: FieldSelector

2007-12-05 Thread Timo Nentwig
On Wednesday 05 December 2007 12:20:51 Grant Ingersoll wrote: > Then, when you go to access those 4 fields, which you most certainly > will at some point soon, otherwise why did you get the document to Nope, I won't :) In fact my Document contain fields I only need for searching and sorting. But

Re: FieldSelector

2007-12-05 Thread Grant Ingersoll
On Dec 5, 2007, at 2:40 AM, Timo Nentwig wrote: On Friday 30 November 2007 19:28:12 Grant Ingersoll wrote: I guess the question becomes what is the nature of your fields? Do you have some really large fields that you want to avoid loading b/c they are not shown initially? That is the main us

Re: FieldSelector

2007-12-04 Thread Timo Nentwig
On Friday 30 November 2007 19:28:12 Grant Ingersoll wrote: > I guess the question becomes what is the nature of your fields? Do > you have some really large fields that you want to avoid loading b/c > they are not shown initially? That is the main use case, I guess. I wonder why there's not Lazy

Re: FieldSelector

2007-11-30 Thread Grant Ingersoll
is just way to fragile. I can understand your hesitation, but good documentation of what you are doing and lots of comments should help :-) Otherwise, the reading twice approach makes sense. Yes, it makes sense the question is whether it performs. The sense of a FieldSelector as I

Re: FieldSelector

2007-11-30 Thread Timo Nentwig
e reading twice approach makes sense. Yes, it makes sense the question is whether it performs. The sense of a FieldSelector as I understand it is to save disk IO (ans maybe also save a couple of bytes RAM...). - To unsubscrib

Re: FieldSelector

2007-11-30 Thread Grant Ingersoll
to load are next). Then, in your FieldSelector, you can, upon seeing the documentType, set the appropriate flags for when the other Fields are read.. Otherwise, the reading twice approach makes sense. -Grant On Nov 30, 2007, at 6:27 AM, Timo Nentwig wrote: Hi! I do have different

FieldSelector

2007-11-30 Thread Timo Nentwig
Hi! I do have different document types (Books, Magazines, Author whatever) in the index and a FieldSelector is document type specific (for Books LOAD isbn and title for Author name, ...). The document type can be determined by a field surprisingly called documentType. How am I going to do

Re: regarding FieldSelector

2007-09-14 Thread Chris Hostetter
: well, I can't see any doc() method with FieldSelector argument, perhaps this : is provided in nightly builds of Lucene, currently I am using Lucene v2.1.0 2.2 was released in June, in it the Searchable interface defines a doc method which takes a FieldSelector... http://lucene.apach

Re: regarding FieldSelector

2007-09-14 Thread Mohammad Norouzi
well, I can't see any doc() method with FieldSelector argument, perhaps this is provided in nightly builds of Lucene, currently I am using Lucene v2.1.0 I am using org.apache.lucene.search.Searcher and new IndexSearcher(a_directory) to instantiate an instance of it On 9/14/07, Grant Inge

Re: regarding FieldSelector

2007-09-14 Thread Grant Ingersoll
Searcher is a Searchable and Searchable defines the doc() method with FieldSelector, but I suppose we could add an abstract declaration of it to Searcher, since it has to be implemented on all derived classes anyway due to it being on the Searchable interface. So, you can either cast to a

Re: regarding FieldSelector

2007-09-14 Thread Mohammad Norouzi
index >> you can write a HitCollector to get the list "lazily". do you mean by writing a HitCollector, all the list will load lazily and no need to use FieldSelector? thanks On 9/13/07, Erick Erickson <[EMAIL PROTECTED]> wrote: > > I'm not entirely sure. So what I&

Re: regarding FieldSelector

2007-09-13 Thread Erick Erickson
> > > > Best > > Erick > > > > On 9/13/07, Mohammad Norouzi <[EMAIL PROTECTED]> wrote: > > > > > > Thanks > > > as I saw the documents, we can only use this great field selector in > > > IndexReader.document() method the probl

Re: regarding FieldSelector

2007-09-13 Thread Mohammad Norouzi
s I saw the documents, we can only use this great field selector in > > IndexReader.document() method the problem is I have a Searcher in my > > result > > set structure and when the client calls getString("a_field_name") at > that > > time I invoke the searcher.do

Re: regarding FieldSelector

2007-09-13 Thread Erick Erickson
urrent_doc_id).get("a_field_name), > I already collected the result IDs. so in my case, I can't use > FieldSelector. > > Do I have to revise the way of retrieving documents in my code? > > > > On 9/12/07, Erick Erickson <[EMAIL PROTECTED]> wrote: > > > &

Re: regarding FieldSelector

2007-09-13 Thread Mohammad Norouzi
_field_name), I already collected the result IDs. so in my case, I can't use FieldSelector. Do I have to revise the way of retrieving documents in my code? On 9/12/07, Erick Erickson <[EMAIL PROTECTED]> wrote: > > Well, it depends on what "improve the search process" means

Re: regarding FieldSelector

2007-09-12 Thread Erick Erickson
t; > > > 2. You only want to load certain fields, or the first field, or you > > just want to know the size of a field. > > > > Basically, it gives you control over how fields are loaded from disk > > in Lucene. > > > > See my ApacheCon Europe presentatio

Re: regarding FieldSelector

2007-09-12 Thread Mohammad Norouzi
on Europe presentation http://cnlp.org/presentations/ > slides/AdvancedLuceneEU.pdf for a few slides (towards the end) on > FieldSelector. > > On Sep 12, 2007, at 5:13 AM, Mohammad Norouzi wrote: > > > Hi all, > > > > Can anyone explain what is the FieldS

Re: regarding FieldSelector

2007-09-12 Thread Grant Ingersoll
ation http://cnlp.org/presentations/ slides/AdvancedLuceneEU.pdf for a few slides (towards the end) on FieldSelector. On Sep 12, 2007, at 5:13 AM, Mohammad Norouzi wrote: Hi all, Can anyone explain what is the FieldSelector and the usage or benefits of this structure? I read the javadocs but I

regarding FieldSelector

2007-09-12 Thread Mohammad Norouzi
Hi all, Can anyone explain what is the FieldSelector and the usage or benefits of this structure? I read the javadocs but I can't get for what goal it is provided in Lucene. Thanks in advance -- Regards, Mohammad -- see my blog: http://brainable.blogspot.com/ anoth

Re: Lucene 2.1, using FieldSelector speeds up my app by a factor of 10+, numbers attached

2007-02-27 Thread Grant Ingersoll
doing performance tuning and/or are just curious. See then end of this e-mail for design notes DISCLAIMER: Your results may vary. Once I figured out the speed-up I got by using FieldSelector, I stopped looking for further improvements or refining my test harness since we're now getting better th

Lucene 2.1, using FieldSelector speeds up my app by a factor of 10+, numbers attached

2007-02-27 Thread Erick Erickson
I thought I'd put up some numbers that may be useful for people who find themselves doing performance tuning and/or are just curious. See then end of this e-mail for design notes DISCLAIMER: Your results may vary. Once I figured out the speed-up I got by using FieldSelector, I stopped lo