Hi Ian,

no the wild cards should not be necessary. That was just the last try
out of some. I now the exact content of both fields in my range query.
The case is as the java code found it, but the analyzer will lowercase
it anyhow. I'm trying the SimpleAnalyzer since all other seem to ommit
single char terms.

name:("A Balladeer") (translated to name:("a balladeer") by the analyzer
gives me the doc I expect with doc Id 13002.
name:("A Perfect Circle") gives me as excpected doc Id 35833.


name:["A Balladeer" TO "A Perfect Circle"] gives zero results. Tried it
also with braces around the term and such stupid things, even if they
shouldn't be needed in a range query.

I'm kinda clueless.


Ian Lea wrote:

Are you sure your range queries should have wild card asterisks on the
end? Looks odd to me and I don't know what the effect would be.

I'd also prefer everything in lower case but maybe you've got the
right analyzers being used consistently in indexing and searching


On Fri, Jul 25, 2008 at 9:53 AM, Thomas Becker wrote:

Hi all,

I need to replace some db queries with lucene due to response time issues
for sure. In this special case I need to do a range query on a field and a
prefix query. I'm trying to prepare and try my query in luke with no success
before migrating it to java.

I need to find all names starting with for example "A Balladeer" to "A
Perfect Circle" in the name field. The sort field is sortName (same content
as name, but untokenized for sorting).

I tried the following in luke which should give me a few hundred docs:

name:["A Balladeer*" TO "A Perfect Circle*"] - 0 results, also there should
be some
name:["A Balladeer*" TO "B*" - >10k results, but also returns results which
have a string in the middle or end starting with A

I tried using sortName (untokenized) field instead:
sortName:["A Balladeer*" TO "B*" - 25 results, all starting with A* (guess
since it's untokenized), but far less than expected again

Tried a couple of more (stupid) things with little success. I googled
around, but I'm kinda stuck here. So I'm asking the list. How can I search
all name/sortName fields in a range between "A Balladeer*" TO "A Perfect
Circle*" and get only terms back which are starting with that terms? Is
there a way to accomplish that in Java and try it in luke?

And is there a way to sort resultsets in luke?


Thomas Becker
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Thomas Becker
Senior JEE Developer

net mobile AG
Zollhof 17
40221 Düsseldorf

Phone: +49 211 97020-195
Fax: +49 211 97020-949
Mobile: +49 173 5146567 (private)
E-Mail: mailto:thomas.becker@net-m.de
Internet: http://www.net-m.de

Registergericht: Amtsgericht Düsseldorf, HRB 48022
Vorstand: Theodor Niehues (Vorsitzender), Frank Hartmann,
Kai Markus Kulas, Dieter Plassmann
Vorsitzender des
Aufsichtsrates: Dr. Michael Briem

To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 5 | next ›
Discussion Overview
groupjava-user @
postedJul 25, '08 at 8:54a
activeJul 25, '08 at 9:36a



site design / logo © 2021 Grokbase