Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
e, or as a wildcard or prefix query (e.g., >"Microsoft*"), or as a range query with the full literal string values. > >-- Jack Krupansky > >-Original Message- >From: Jochen Hebbrecht >Sent: Monday, August 20, 2012 9:13 AM >To: java-user@lucene.apache.org >Subject

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jack Krupansky
the full literal string values. -- Jack Krupansky -Original Message- From: Jochen Hebbrecht Sent: Monday, August 20, 2012 9:13 AM To: java-user@lucene.apache.org Subject: Re: TermRangeQuery with multiple words Hi Ian, Thanks for your answer! Well, my example might have been not so clear. He

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
Hehe Ian, our mails just crossed. I was thinking in the same way! :-). Thanks for your reply! 2012/8/20 Ian Lea > Jochen > > > No, I don't think that Lucene can make a String range query on > multiple terms. For your Microsoft example you could build a query > with Microsoft as required TermQue

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
Hmm, just thinking. I could split the value on spaces. Then I can say: +TEST:Microsoft +TEST:[Belgium TO Spain] I just tested it, and it seems to work :-) ... 2012/8/20 Jochen Hebbrecht > Hi Ian, > > Thanks for your answer! > Well, my example might have been not so clear. Here's a better exam

Re: TermRangeQuery with multiple words

2012-08-20 Thread Ian Lea
Jochen No, I don't think that Lucene can make a String range query on multiple terms. For your Microsoft example you could build a query with Microsoft as required TermQuery and a required TermRangeQuery from Belgium to Spain but that would fall apart with multiword company or region names. It

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
Hi Ian, Thanks for your answer! Well, my example might have been not so clear. Here's a better example: Doc 01: TEST: "Microsoft Belgium" Doc 02: TEST: "Apple" Doc 03: TEST: "Microsoft France" Doc 04: TEST: "Evian" Doc 05: TEST: "Nokia" Doc 06: TEST: "Novotel" Doc 07: TEST: "Microsoft Germany" Do

Re: TermRangeQuery with multiple words

2012-08-20 Thread Ian Lea
This won't work with TermRangeQuery because neither "test 1" not "test 3" are terms. "test" will be a term, output by the analyzer. You'll be able to see the indexed terms in Luke. Sounds very flaky anyway - you'd get "term 10 xxx" and "term 100 xxx" as well as "term 1" and "term 2". If your TE