RE: Boolean AND query
Hi, To achieve what you want, you need to use the required operand (+) --Daniel -Original Message- From: Aruna Raghavan [mailto:[EMAIL PROTECTED]] Sent: quinta-feira, 21 de fevereiro de 2002 13:44 To: 'Lucene Users List' Subject: Boolean AND query Hello, Has anyone run into problems with boolean AND query? Basically, I am using the following code to do the query to look for 10060 AND 10040 BooleanQuery bq = new BooleanQuery(); Analyzer analyzer = new StandardAnalyzer(); Query query = QueryParser.parse(m_strKeyword, pageText, analyzer); bq.add(query, true, false); In this case, I am just using one query to add to bq but there can be more. I am getting correct results when 10060 AND 10040 exists in the document. But when one of them does not exist, I am still getting the same results. In other words, AND seems to be acting like an OR. I noticed this in the latest RC4 as well as an older lucene build from before lucene joined jakarta. Thanks! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Indexing database
I think you'd have to use the DateFilter. I've never used it myself but it shouldn't be hard to use. --Daniel -Original Message- From: Paulius Galubickas [mailto:[EMAIL PROTECTED]] Sent: segunda-feira, 18 de fevereiro de 2002 08:04 To: [EMAIL PROTECTED] Subject: Indexing database Hello LUCENE Gurus, I am very new user of lucene:)) I am building web portal, my all date is in oracle tables, and web page is generated by servlets. In that datebase I have one table(different articles) with 4 fields. I want in search page, made with lucene, enter a date and to get all articles made on that date. The problem is I dont know is it possible to make such kind of indexing? If yes, could you give me guidelines how to make it? Thank you very much. with best regards paulius __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Lucene Build Instructions
I agree. I think this should be fixed before the official release (I've had trouble building Lucene and I've seen messages from other users with the same problem). Can you make the changes and submit the patches? Then, if everybody agrees, they can be commited. --Daniel -Original Message- From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Sent: sábado, 16 de fevereiro de 2002 00:38 To: Lucene Users List Subject: Re: Lucene Build Instructions I would go so far as to even recommend that javacc.home be defined in build.xml with a default location that is the recommend home for it and if it needs adjusting it would happen via build.properties or -D command-line switch. Again, I'm here to help and volunteer my Ant expertise to lucene-dev. Just e-mail me and ask! Erik - Original Message - From: Daniel Calvo [EMAIL PROTECTED] To: Lucene Users List [EMAIL PROTECTED] Sent: Friday, February 15, 2002 11:09 PM Subject: RE: Lucene Build Instructions Hi, That's why I've suggested changes in build.xml to look for .ant.properties files (posted in the developers list) but after reading acoliver and Erik replies I agreed with them. The best option would be having all properties defined in build.xml and eliminate build.properties. Each user would be responsible for the local configuration in a build.properties file (javacc.home would be defined there) and a sample build.properties would be provided to help this process. --Daniel $ pwd /work/lucene-1.2-rc3-src $ cat .ant.properties javacc.home=/work/javacc2.1/bin/lib $ ls /work/javacc2.1/bin/lib/JavaCC.zip /work/javacc2.1/bin/lib/JavaCC.zip $ ant Buildfile: build.xml init: javacc_check: [echo] ## JavaCC not found. JavaCC Home: ./ JavaCC Zip: .//lib/JavaCC.zip Please download and install JavaCC 2.0 from: http://www.webgain.com/products/metamata/java_doc.html Then, create a .ant.properties file either in your home directory, or within the Lucene directory and set the javacc.home property to the path where JavaCC.zip is located. For example, if you installed JavaCC in /usr/local/java/javacc2.0, then set the javacc.home property to: javacc.home=/usr/local/java/javacc2.0/bin/lib If you get an error like the one below, then you have not installed things correctly. Please check all your paths and try again. java.lang.NoClassDefFoundError: COM/sun/labs/javacc/Main ## $ cp .ant.properties ~/ $ ant [no change from above] $ cp /work/javacc2.1/bin/lib/JavaCC.zip lib/ $ ant Buildfile: build.xml init: javacc_check: compile: jar: BUILD SUCCESSFUL So perhaps it wasn't finger trouble but something else. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [PATCH] Re: Lucene Build Instructions
From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Ok, here's the patch. It includes my earlier patch with the docweb additions (see my previous patch for the related code). All I really did was paste in build.properties. Yep, that's what I was expecting to see but since you know Ant a lot better than me I thought that maybe you'd come with something different ;-) Don't know about the others by I vote for incorporating these changes on the next release. Thanks, --Daniel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Lucene beginner
Hi Saima, To run the demo, you have to have lucene-demos-1.2-rc3.jar and lucene-1.2-rc3.jar in your context classpath. If you're using Tomcat, you can either have a directory under your application WEB-INF named lib with the jars or put them under Tomcat's common/lib (the former option is prefered, since probably other applications don't need access to these jars). Don't forget to configure the demo file configuration.jsp, so that indexLocation points to the place you've created your index. --Daniel -Original Message- From: Saima Shaikh [mailto:[EMAIL PROTECTED]] Sent: terça-feira, 12 de fevereiro de 2002 07:40 To: 'Lucene Users List' Subject: RE: Lucene beginner Daniel, Thank you very much for replying. I've managed to get to the stage of running the demo and can bring up the search page. But I get an internal server error saying that it was unable to compile the class for JSP because 7 packages were not found: -org.apache.lucene.analysis.*; -org.apache.lucene.document.*; -org.apache.lucene.index.*; -org.apache.lucene.search.*; -org.apache.lucene.queryParser.*; -org.apache.lucene.demo.*; -org.apache.lucene.demo.html.Entities; I know that these are imported at the top of results.jsp but where should they be places within the Jakarta directory and where in lucene can I obtain them from ? Thanks again, Saima -Original Message- From: Daniel Calvo [mailto:[EMAIL PROTECTED]] Sent: 11 February 2002 20:16 To: Lucene Users List Subject: RE: Lucene beginner Hi, You have to use the IndexHTML program to create an index and then you can use this index with the demo. Something like 'java org.apache.lucene.demo.IndexHTML [-create] [-index index]root_directory'. You need lucene and lucene-demo jars in your classpath. If needed, you can use -cp to provide them (java -cp lucene-demos-1.2-rc3.jar;lucene-1.2-rc3.jar org.apache.lucene.demo.IndexHTML ) What's exactly the problem you're having? Regarding Ant, it is a Java based build tool (like make) You don't need to use it unless you want to build lucene. If you're using lucene's binary distribution you only have to have lucene's jar in your application classpath. Regards, --Daniel -Original Message- From: Saima Shaikh [mailto:[EMAIL PROTECTED]] Sent: segunda-feira, 11 de fevereiro de 2002 06:58 To: 'Lucene Users List' Subject: Lucene beginner I am new to Lucene and am quite overwhelmed with the whole installation and deployment process. I am trying to get the web application demo going but am stuck at the stage where you have to create the index as I am a bit confused at the instructions. Could someone please clarify this part for me ? Also, I have not yet installed Ant. What is it and do I need to install it ? Thanks very much. Saima -#-#-#-#-#-#-#-#-#-# The Pareto Partners group of firms is structured as an affiliation of different legal entities established in various jurisdictions. The principle legal entity is Pareto Partners, a partnership established under the laws of England and Wales (which is a separate legal entity from the affiliated partnership of the same name based in New York City and established under the laws of the State of New York). The partnership established under the laws of England and Wales is regulated by, amongst other regulators, the United Kingdom's Financial Services Authority. The information contained in this e-mail is confidential and is intended solely for the use of the named addressee. Access to this e-mail by any other person is not authorised. If you are not the intended recipient, please do not disclose, copy, distribute, take any action or rely on it and please advise us immediately by return e-mail to [EMAIL PROTECTED] The information contained in this email has been obtained in good faith from sources believed to be reliable but no representation or warranty is given or may be implied that it is entirely accurate or complete, and may be subject to change. If the email is addressed to a client, any opinion or advice contained in this e-mail is subject to the terms and conditions expressed in the governing client agreement. Any views or opinions presented are solely those of the author and do not necessarily represent those of any Pareto firm. -#-#-#-#-#-#-#-#-#-# -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -#-#-#-#-#-#-#-#-#-# The Pareto Partners group of firms is structured as an affiliation of different legal entities established in various jurisdictions. The principle legal entity is Pareto Partners, a partnership established under the laws of England and Wales (which is a separate legal entity from the affiliated partnership
RE: indexing and searching HTML files
Hi, There's a demo that comes in lucene-1.2- rc3 that presents a way of doing this. I believe it can give you a very good idea. --Daniel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: terça-feira, 12 de fevereiro de 2002 12:27 To: [EMAIL PROTECTED] Subject: indexing and searching HTML files Hi all Can any body tell me the steps to index and search HTML documents. Jack -- __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
search similar docs?
Hi, I was thinking of implementing a search for similar documents (like some commercial search engines do) and wondering if anyone has already done something like that with Lucene. I thought of collecting all terms of the selected document (or maybe some subset of them) and then creating a MultiTermQuery containing those terms. Does it make sense? Is there a better way to achieve this? In order to do it, I would have to get all terms of a given document and so far I haven't found an easy way of doing it (I hope there's one ;-). The way I was thinking is to extend FilteredTermEnum but, instead of selecting terms by similarity, select them by docid (for each term, get its termdocs and check for the desired docid). It doesn't look very efficient so if someone could contribute with other ideas or even related experiences I'd appreciate very much. TIA Best regards, --Daniel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problems with last patch (obtain write.lock while deleting documents)
Hi Doug, Problem solved, thanks! BTW, is the way I'm doing the deletion the correct one? I reckon I can't use a cached reader, since I have to close it after the deletion to release the write lock. Does it make sense? Regarding writers, is it ok to share a single IndexWriter with multiple writers, i.e., I have one writer adding a document and then I get another request for doc upload. I can't open a new IndexWriter because of the write lock, so I'm using the one already available. After all writers are done, the IndexWriter is closed. Again, thanks a lot (for the fix and, most important, for Lucene) --Daniel -Original Message- From: Doug Cutting [mailto:[EMAIL PROTECTED]] Sent: domingo, 10 de fevereiro de 2002 19:55 To: 'Lucene Users List' Subject: RE: problems with last patch (obtain write.lock while deleting documents) From: Daniel Calvo [mailto:[EMAIL PROTECTED]] I've just updated my version (via CVS) and now I'm having problems with document deletion. I'm trying to delete a document using IndexReader's delete(Term) method and I'm getting an IOException: java.io.IOException: Index locked for write: Oops. I think I see the problem. I only tested this on an optimized index! I just checked in a fix. Try it and tell me how it goes. Sorry for the inconvenience, Doug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problems with last patch (obtain write.lock while deleting documents)
From: Doug Cutting [mailto:[EMAIL PROTECTED]] It is most effiecient to batch deletions and insertions, i.e., perform a bunch of deletions on a single IndexReader, close it, then perform a bunch of insertions on a single IndexWriter. Usually the IndexReader that you do the deletions on is different than the one other threads are simultaneously using for searching, since if you close a reader while a search is underway it will crash the search. Unfortunately I can't do that in my application. Users are allowed to insert and delete files at any time and changes should be reflected asap. Thanks for the answer, --Daniel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem with last patch (obtain write.lock while deleting documents)
Hi, I've just updated to the latest version (to get the fix for the NullPointerException with some phrase queries) and now I'm having problems with document deletion. I'm trying to delete a document using delete(Term) and I'm getting an IOException: java.io.IOException: Index locked for write: Lock@E:\temp\index\write.lock at org.apache.lucene.index.IndexReader.delete(Unknown Source) at org.apache.lucene.index.SegmentsReader.doDelete(Unknown Source) at org.apache.lucene.index.IndexReader.delete(Unknown Source) at org.apache.lucene.index.IndexReader.delete(Unknown Source) (...) Here's what I'm doing: IndexReader reader = IndexReader.open(index); reader.delete(new Term(fileid, id)); reader.close(); I've taken a look at the sources but couldn't find anything wrong. Any ideas? BTW, when performing this deletion there's no index writer opened; I assume the writer lock is being created by the IndexReader when executing delete(numDoc). TIA Regards, --Daniel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]