Re: Querying multiple fields in a document

2007-02-25 Thread Laxmilal Menaria
Hi, i think you will use MultiSearcher and create a field and Value array for that, that will solve your problem.. thanks On 2/25/07, ruchi thakur <[EMAIL PROTECTED]> wrote: Hello, I am new to Lucene. I have a document with 3 fields - name,subject,rollno I want to search on the 2 field name

Re: Querying multiple fields in a document

2007-02-25 Thread Nicolas Lalevée
Le dimanche 25 février 2007 12:35, Laxmilal Menaria a écrit : > Hi, i think you will use MultiSearcher and create a field and Value array > for that, that will solve your problem.. I don't know what was your issue Laxmilal, but Ruchika just need a simple query : "+name:bob +subject:maths". Nicol

Re: how to define a pool for Searcher?

2007-02-25 Thread karl wettin
25 feb 2007 kl. 06.04 skrev Mohammad Norouzi: still I dont know ehrthrt the reader is important for Hits or Searcher? consider I passed a hits to my ResultSet, now, if I close searcher, will the Reader get closed? or another vague thing is can a Reader work thread safely for every Searcher

Re: how to define a pool for Searcher?

2007-02-25 Thread Mark Miller
I am a bit confused about what you are asking. Why do you need the Searcher to time out? That code should release your searchers at the appropriate times...when the index has been modified. The way that I use it is to make a synchronized map that keeps around an index accessor for each index th

Re: how to define a pool for Searcher?

2007-02-25 Thread Mohammad Norouzi
Hi actually I dont have any writer or writing reader. I just have reader. when a reader is created by the user because the document returned by hits is very much, for example 20,000 so I display the result page by page. whenever user click to next page the hits will use the reader to load next 20

Re: how to define a pool for Searcher?

2007-02-25 Thread Mark Miller
If you never modify your index you should never need to close your reader (or searcher). Doing so would just slow you down. Mohammad Norouzi wrote: Hi actually I dont have any writer or writing reader. I just have reader. when a reader is created by the user because the document returned by h

Re: updating index

2007-02-25 Thread Erick Erickson
Yes, I'm pretty sure you have to index the field (UN_TOKENIZED) to be able to fetch it with TermDocs/TermEnum! The loop I posted works like this for each term in the index for the field if this is one I want to update use a TermDocs to get to that document and operate on it. But

Re: how to define a pool for Searcher?

2007-02-25 Thread Mohammad Norouzi
so, you mean, I open one reader for each session (each user) and never close it until the session has expired? if I do this, is that affect the performance? On 2/25/07, Mark Miller <[EMAIL PROTECTED]> wrote: If you never modify your index you should never need to close your reader (or searcher)

Re: how to define a pool for Searcher?

2007-02-25 Thread Nicolas Lalevée
Le dimanche 25 février 2007 16:55, Mohammad Norouzi a écrit : > so, you mean, I open one reader for each session (each user) and never > close it until the session has expired? if I do this, is that affect the > performance? The searcher/reader is a view on the index. And each time you open a new

QueryParser oddity with PrefixQuery

2007-02-25 Thread Antony Bowesman
In certain cases, I use a modified QueryParser which does not allow "field:" syntax. While testing variants of Prefix and Wildcard Query, I came across an oddity with getPrefixQuery(). The standard getPrefixQuery() (2.1) is given termStr without the trailing *, so the check if (!allowLeading

A solution to HitCollector-based searches problems

2007-02-25 Thread oramas martín
Hello, As you probably know, the HitCollector-based search API is not meant to work remotely, because it will generate a RPC-callback for every non-zero score. There is another problem with MultiSearcher-HitCollector-based search which knows nothing about mix HitCollector based searches (not to

Re: A solution to HitCollector-based searches problems

2007-02-25 Thread Grant Ingersoll
However, see Wiki HowToContribute: http://wiki.apache.org/jakarta- lucene/HowToContribute if you wish to donate your code. -Grant On Feb 25, 2007, at 6:56 PM, oramas martín wrote: Hello, As you probably know, the HitCollector-based search API is not meant to work remotely, because it will g

Re: filtering by first letter

2007-02-25 Thread Paul Sundling (Webdaddy)
OK I'm not sure I understand your answer. I thought TermEnum gave you all the terms in an index, not from a search result. Let me clarify what I need. I'm looking for a way to find out all the values of the FIELD_FILTER_LETTER field for any given search. INDEX TIME: (done for each indexed

Re: filtering by first letter

2007-02-25 Thread Erick Erickson
OK, I was thinking you were wondering how to get only the set of letters you wanted the user to be able to choose from You're right, the TermEnum/TermDocs tell you all of the terms in an index, not really useful for your problem as I understand it now How many documents do you have in y

Re: a question about indexing database tables

2007-02-25 Thread Mohammad Norouzi
Hi Erick thank you and sorry for taking long my reply. I am involving in a project. I was thinking of your idea about storing all tables in the same field. it seems to me a good idea, but some vague issues. first, how to create a lucene's document. did you mean, storing all tables by joining all