RE: Re: Help on the Query Parser

2004-11-24 Thread Terence Lai
Hi Morus, I want to search for the string like below: - java developer - javascript developer By searching "java*", it will return more than I want. That's why I am thinking "java* developer". Terence > Terence Lai writes: > > > > Look likes that th

RE: Re: Help on the Query Parser

2004-11-24 Thread Terence Lai
Hi Daniel, I couldn't figure out how to use the PharsePrefixQuery with a phase like "java* developer". It only provides method to add terms. Can a term contain wildcard character in lucene? Thanks, Terence > On Wednesday 24 November 2004 08:16, Morus Walter wrote: > > > Lucene itself doesn't

Help on the Query Parser

2004-11-23 Thread Terence Lai
Hi all, I am trying to use the QueryParser.parse() to parse a query string like "java* developer". Note that I want the wildcard string, java*, followed by the word developer. The following is the code. - String qryStr = "\"java* developer\""; String fieldname = "text"; StandardAnal

RE: memory leek in lucene?

2004-08-20 Thread Terence Lai
Are you calling ParallelMultiSearcher.search(Query query, Sort sort) to do your search? If so, I am currently having a similar problem. Terence > > Doing query against lucene I run into memomry problem, i.e. it's look like > it's not giving memory back after the > query have been executed. >

RE: Re: Re: OutOfMemoryError

2004-08-18 Thread Terence Lai
Hi David, In my test program, I invoke the IndexSearcher.close() method at the end of the loop. However, it doesn't seems to release the memory. My concern is that even though I put the IndexSearcher.close() statement in the hook methods, it may not release all the memory until the application

RE: Re: OutOfMemoryError

2004-08-18 Thread Terence Lai
to work with Lucene. > The project is on SF.net. > > Otis > > --- Terence Lai <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > > I am getting a OutOfMemoryError when I deploy my EJB application. To > > debug the problem, I wrote the followi

RE: Re: OutOfMemoryError

2004-08-18 Thread Terence Lai
SF.net. > > Otis > > --- Terence Lai <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > > I am getting a OutOfMemoryError when I deploy my EJB application. To > > debug the problem, I wrote the following test program: > > > > public static void main

RE: Re: OutOfMemoryError

2004-08-17 Thread Terence Lai
Thanks for pointing this out. Even I fixed the code to close the "fsDir" and also add the ex.printStackTrace(System.out), I am still hitting the OutOfMemeoryError. Terence > On Wednesday 18 August 2004 00:30, Terence Lai wrote: > > Â Â Â Â Â Â if (fsDir != null) {> Â Â Â

RE: OutOfMemoryError

2004-08-17 Thread Terence Lai
Sorry. I should make it more clear in my last email. I have implemented an EJB Session Bean executing the Lucene search. At the beginning, the session been is working fine. It returns the correct search results to me. As more and more search requests being processed, the server ends up having th

OutOfMemoryError

2004-08-17 Thread Terence Lai
Hi All, I am getting a OutOfMemoryError when I deploy my EJB application. To debug the problem, I wrote the following test program: public static void main(String[] args) { try { Query query = getQuery(); for (int i=0; i<1000; i++) { search(qu

RE: MultiSearcher to Indexing.

2004-08-12 Thread Terence Lai
This is how I do it: IndexSearcher[] is = new IndexSearcher[2]; is[0] = new IndexSearcher(IndexDir1); // first index folder is[1] = new IndexSearcher(IndexDir2); // second index folder MultiSearcher searcher = new MultiSearcher(is); searcher.search(query); I think that the MulitSearcher is onl

Question on the minimum value for DateField

2004-08-04 Thread Terence Lai
Hi All, I realize that the DateField cannot except the value which is before the Year 1970, specifically in the org.apache.lucene.document.DateField.timeToString() method. Is there are any techincal reason for this limitation? Thanks, Terence

Joining a common field from 2 separate index directories/files?

2004-07-29 Thread Terence Lai
Hi, Does anyone know whether Lucene can perform a search on 2 separate index files with joining a common field? I am trying to similate the database table join relationship. As an illustration, let's say we have the following 2 different indice: Index 1 (Course Information)

RangeQuery on Numeric values

2004-07-23 Thread Terence Lai
Hi, I am currently using Lucene 1.4 Final. I want to construct a query that matches a numeric range. I believe that the RangeQuery defined in Lucene API uses the string comparision. It does not work for numeric contents. Does anyone know how to create a numeric range query? Thanks, Terence

Re: RE: Building query to match a sub-string of a field

2004-06-29 Thread Terence Lai
e problems because of these classes. There were a few minor changes that needed to be made to that code to make it work with the latest Lucene 1.4RC3 - I think it was just a matter of changing a constructor signature. Ben -Original Message- From: Terence Lai [mailto:[EMAIL PROTECTED] Sent: Tue

Building query to match a sub-string of a field

2004-06-29 Thread Terence Lai
Hi Everyone, I am trying to construct a query which matches a sub-string of a field. As an illustration, I would like to search the following words by using the sub-string "test": - test - testing - contest - contestable I realize that Lucene does support wildcard searches using "*" and "?" in

RE: Build lucene1.4-rc3

2004-05-15 Thread Terence Lai
You need to use Ant 1.6 to build lucene. The BUILD.txt does mention that. Basic steps: 0) Install JDK 1.2 (or greater), Ant 1.6 (or greater), and the Ant optional.jar 1) Download Lucene from Apache and unpack it 2) Connect to the top-level of your Lucene installation 3) Install JavaCC

Question on QueryParser.parse()

2004-05-14 Thread Terence Lai
I am trying to create a query object using the QueryParser for the search word "A+". However, it always returns a Null object back. My code is stated below: Query q = QueryParser.parse("A\+", "myIndex", new StandardAnalyzer()); I've also tried the following query strings, but none of them re