RE: input reader closed after IndexWriter.addDocument(doc)

2005-09-15 Thread Kunemann Frank
What stops you from using the reader before you add the document to the index? Frank -Original Message- From: Beady Geraghty [mailto:[EMAIL PROTECTED] Sent: Thursday, September 15, 2005 2:30 AM To: java-user@lucene.apache.org Subject: input reader closed after

RE: input reader closed after IndexWriter.addDocument(doc)

2005-09-15 Thread Chris Hostetter
: : I wasn't expect addDocument to close it. : : I am wondering if there is a reason that rdr should be : : closed after addDocument, and if there is a way to leave it open ? : What stops you from using the reader before you add the document to the : index? That doesn't really help people who

RE: Is Lucene for Me?

2005-09-15 Thread Peter Veentjer - Anchor Men
It is something you have to do yourself and it depends on the requirements. One of our db-searcheengines scans the database for updates periodically (all records have a 'last-modified' field). Another of our solutions doesn`t scan the db, but is activated by a server application to update the

Terms given a filter?

2005-09-15 Thread JMA
Greetings - I know I can get all the fields in an index: reader.getFieldNames() and also all the terms: reader.terms() However, I need to be able to get all the terms and fields given a search filter. For example, say I have an index that has crawled 5000 pdf files (books) and I have the

Re: Terms given a filter?

2005-09-15 Thread mark harwood
This sounds like another group by totalling question. See the generic group by totalling code I posted here: http://marc.theaimsgroup.com/?l=lucene-devm=111044178212335w=2 In your example there is no quality threshold (just a filter bitset of books in 2002) so you can replace the scores array in

Re: input reader closed after IndexWriter.addDocument(doc)

2005-09-15 Thread Beady Geraghty
Thank you all for the responses. I'll try to work around this. On 9/15/05, Chris Hostetter [EMAIL PROTECTED] wrote: : : I wasn't expect addDocument to close it. : : I am wondering if there is a reason that rdr should be : : closed after addDocument, and if there is a way to leave it

Small problem in searching

2005-09-15 Thread tirupathi reddy
Hi guys, I have some problem while searching using Lucene. Say I have some thing like tirupathireddy or venkatreddy in the index. When i search for string reddy I have to get those things (i.e. tirupathireddy and venkatreddy). I have read in Query syntax of Lucene that * will not be

Question: force a field must be matched?

2005-09-15 Thread James Huang
Suppose I have a book index with field=publisher, field=title, etc. I want to search for books only from Manning, do I have to do anything special? how? Thanks, -James __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection

Question: dynamic sorting

2005-09-15 Thread James Huang
Suppose I have a book index with field=publisher, field=title, etc. If a user has bought Manning books, then I like to sort the result with Manning books listed first. In essence, I'm asking for a parameterized custom sorting. Is there a way to do this? Thanks, -James

Re: Small problem in searching

2005-09-15 Thread jian chen
Hi, I think Lucene transforms the prefix match query into all sub queries where the searching for a prefix could result into search for all terms that begin with that prefix. For postfix match, I think you need to do more work than relying on Lucene's query parser. You can iterate over the

Re: Question: force a field must be matched?

2005-09-15 Thread Jason Haruska
On 9/15/05, James Huang [EMAIL PROTECTED] wrote: Suppose I have a book index with field=publisher, field=title, etc. I want to search for books only from Manning, do I have to do anything special? how? add new BooleanClause(new TermQuery(new Term(publisher,Manning)), true, false) to your

Re: Question: force a field must be matched?

2005-09-15 Thread James Huang
Thanks Jason. I wonder if that's the same as queryString + publisher:Manning and pass on to the query parser? -James --- Jason Haruska [EMAIL PROTECTED] wrote: On 9/15/05, James Huang [EMAIL PROTECTED] wrote: Suppose I have a book index with field=publisher, field=title, etc. I

Re: document attributes

2005-09-15 Thread Otis Gospodnetic
This should get you started: http://www-128.ibm.com/developerworks/java/library/j-lucene/ Also check Chapter 7 (3rd hit) here for working code: http://www.lucenebook.com/search?query=indexing+xml Otis --- Madhu Satyanarayana Panitini [EMAIL PROTECTED] wrote: Hi all I have already

Re: Question: dynamic sorting

2005-09-15 Thread Otis Gospodnetic
Hi James, Check out the org.apache.lucene.search.package, there are several sort classes that will let you write a custom sorter. If you have a copy of LIA, look at chapter 6 for an example ( http://www.lucenebook.com/search?query=custom+sort+section%3A6* ) Otis --- James Huang [EMAIL

Re: Question: dynamic sorting

2005-09-15 Thread James Huang
Hi Otis, Thanks for your answer. I do have LIA (but not with me now physically), and have the impression that the search ordering is predetermined (at index time); what I want is search-time ordering, e.g., I'm at (x,y) now and low on gas; find me the closest airports that can land 747, the

Re: Question: force a field must be matched?

2005-09-15 Thread Chris Hostetter
: I wonder if that's the same as : : queryString + publisher:Manning : : and pass on to the query parser? assuming queryString is a java variable containing your initial query, then you are close, but not quite. If you want to tell QueryParser to make a clause required then you have to

Re: Question: force a field must be matched?

2005-09-15 Thread James Huang
Yes, + is what I missed! Thanks. Suppose there is a book published by 3 publishers (I don't know how that works in real world): // At index time: doc.add( Field.Keyword(publisher, Manning) ); doc.add( Field.Keyword(publisher, SAMS) ); doc.add( Field.Keyword(publisher, O'Reilly) ); // At

term scoring (idf) question

2005-09-15 Thread Yonik Seeley
I'm trying to figure out why idf is multiplied twice into the score of a term query. It sort of makes sense if you have just one term... the original weight is idf*boost, and the normalization factor is 1/(idf*boost), so you multiply in the idf again if you want the final score to contain an

Re: term scoring (idf) question

2005-09-15 Thread Otis Gospodnetic
I think you are asking about this stuff: http://www.google.com/search?q=chuck%20idf%20lucene%20square Otis --- Yonik Seeley [EMAIL PROTECTED] wrote: I'm trying to figure out why idf is multiplied twice into the score of a term query. It sort of makes sense if you have just one term... the

Re: Terms given a filter?

2005-09-15 Thread Erik Hatcher
On Sep 15, 2005, at 5:00 AM, JMA wrote: I know I can get all the fields in an index: reader.getFieldNames() and also all the terms: reader.terms() However, I need to be able to get all the terms and fields given a search filter. For example, say I have an index that has crawled 5000 pdf

Re: Blackberry

2005-09-15 Thread Nader Henein
Can you provide some stats on the Zarus implementation you´re using, I´m curious about indexing and searching speeds, also memory and index space consumption, J2ME functions on a whole different level then J2SE or J2EE for that matter. Nader Henein -- Original Message

HitCollector with RemoteSearchable

2005-09-15 Thread Youngho Cho
Hello, Can I use HitCollector with RemoteSearchable ? I am tring to use it. But I got the following error. java.rmi.MarshalException: error marshalling arguments; nested exception is: java.io.NotSerializableException: org.apache.lucene.search.MultiSearcher$1 at