RE: Modify TermQueries or Tokens

2010-05-01 Thread Christopher Condit
> It looks good to me, but I did not test, when testing, we may print out both > > initialQuery.toString() // query produced by QueryParser > finalQuery.toString() // query after your new function > > as comparison, besides testing the query result. Yes - it's exactly what I wanted: Test Input

RE: Modify TermQueries or Tokens

2010-04-30 Thread Zhang, Lisheng
- From: Christopher Condit [mailto:con...@sdsc.edu] Sent: Friday, April 30, 2010 4:06 PM To: java-user@lucene.apache.org Subject: RE: Modify TermQueries or Tokens > 2) if I have to accept whole input string with all logic (AND, OR, ..) inside, >I think it is easier to change TermQuery afte

RE: Modify TermQueries or Tokens

2010-04-30 Thread Christopher Condit
> 2) if I have to accept whole input string with all logic (AND, OR, ..) inside, >I think it is easier to change TermQuery afterwards than parsing the > string, >since final result from query parser should be BooleanQuery (in your > example), >then we iterate through each BooleanClause

RE: Modify TermQueries or Tokens

2010-04-30 Thread Zhang, Lisheng
have not done that myself before, but feel it should work. Best regards, Lisheng -Original Message- From: Christopher Condit [mailto:con...@sdsc.edu] Sent: Friday, April 30, 2010 2:08 PM To: java-user@lucene.apache.org Cc: Zhang, Lisheng Subject: RE: Modify TermQueries or Tokens Hi Li

RE: Modify TermQueries or Tokens

2010-04-30 Thread Christopher Condit
Hi Lisheng- >> On a small index that I have I'd like to query certain fields by adding >> wildcards >> on either side of the term: foo -> *foo*. I realize the performance >> implications but there are some cases where these terms are crammed >> together in the indexed content (ie foonacho) and I

RE: Modify TermQueries or Tokens

2010-04-30 Thread Zhang, Lisheng
rked for me well. Best regards, Lisheng -Original Message- From: Zhang, Lisheng [mailto:lisheng.zh...@broadvision.com] Sent: Friday, April 30, 2010 1:41 PM To: java-user@lucene.apache.org Subject: RE: Modify TermQueries or Tokens Hi, Lucene already have class WildcardQuery, I think

RE: Modify TermQueries or Tokens

2010-04-30 Thread Zhang, Lisheng
- From: Christopher Condit [mailto:con...@sdsc.edu] Sent: Friday, April 30, 2010 1:11 PM To: java-user@lucene.apache.org Subject: Modify TermQueries or Tokens On a small index that I have I'd like to query certain fields by adding wildcards on either side of the term: foo -> *foo*. I reali

Modify TermQueries or Tokens

2010-04-30 Thread Christopher Condit
On a small index that I have I'd like to query certain fields by adding wildcards on either side of the term: foo -> *foo*. I realize the performance implications but there are some cases where these terms are crammed together in the indexed content (ie foonacho) and I need to be able to return