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.apache.org/java

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 Ingersoll <[E

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
actually, I show the result with pagination support, and they have option to choose the number of records per page. and yes, I should provide a test program, but about the HitCollector, I already created one, and collect all lucene's document id and also my needed ID that stored in the index >> yo

Re: regarding FieldSelector

2007-09-13 Thread Erick Erickson
I'm not entirely sure. So what I'd do if I were you is write a little test program and step through it in the debugger and see But, if you're only allowing the user to fetch a single document at a time, I don't think it matters enough to worry about. If, on the other hand, you're allowing the

Re: regarding FieldSelector

2007-09-13 Thread Mohammad Norouzi
well, actually, I have 5 index directory and it will increase in future. and the thing is that each document about 20 fields on average. considering many users may connect to the system (we anticipate 500 users at this time) I want to know whether this will make performance issue or not. we provi

Re: regarding FieldSelector

2007-09-13 Thread Erick Erickson
Do you have any evidence that you're having a performance issue? If not, I'd just do the simple thing and ignore the rest. The performance issues I found were because I was spinning through many, many documents. If you're only worrying about one document at a time, it may not be an issue. If you *

Re: regarding FieldSelector

2007-09-13 Thread Mohammad Norouzi
Thanks as 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.doc(current_doc_id).get("a_field_name), I alre

Re: regarding FieldSelector

2007-09-12 Thread Erick Erickson
Well, it depends on what "improve the search process" means in your context .. But I had a case similar to yours that I wrote up in the Wiki where my search times improved about 10X by using lazy loading. You might want to read that entry here... http://wiki.apache.org/lucene-java/FieldSelectorPe

Re: regarding FieldSelector

2007-09-12 Thread Mohammad Norouzi
Hi Grant, Really thanks for your nice document about advanced Lucene. it was very useful for me. as I understand, we can set some large fields to be lazily loading, now my question is when it will be loaded? it make sense when we call doc.get("field_name") it will load from the index, Am I right?

Re: regarding FieldSelector

2007-09-12 Thread Grant Ingersoll
Hi Mohammad, The typical use cases are: 1. You have several small fields used in a results display and one or two large fields (i.e. the original document) and you don't want to pay the cost of loading the large fields for results display because most of them won't be chosen. When a result

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/ another in