In the Lucene build that we've got (2/21) the question mark does not do a
single-character replace. Does anyone know why? We're using the
StandardAnalyzer and the default QueryParser.

-----Original Message-----
From: Peter Carlson [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 23, 2002 5:23 PM
To: Lucene Users List
Subject: Re: Googlifying lucene querys


Hi Jari,

Lucene is designed as an API with different components broken out so a
developer can create the uniqueness required.

One part of Lucene is the QueryParser. The QueryParser takes a search string
and create a set of classes based on the current QueryParser.jj
implementation and turns it into a Lucene Query. This is meant to be a good
solution for most people, but it is just a sample of what can be done.

In the current implementation of QueryParser

'george bush "white house"'
Will create an OR query of
George OR bush OR "white house"
Basically, the default is an OR between words unless otherwise specified.

You can use other boolean operators like AND, and NOT
So 
'george AND bush OR "white house" NOT ford'

Lucene and the current QueryParser supports
wildcards with the * character
Single character replace with the ? Character
Fuzzy searches with the ~ character when next to a single word term
Proximity searches (just added to QueryParser) with the ~3 next to a phrase
term

Again, you can create your own QueryParser to create your desired
implementation.

I hope this helps.

--Peter




On 2/23/02 8:19 AM, "Jari Aarniala" <[EMAIL PROTECTED]> wrote:

>> +george +bush +white +house
> 
> Well, that's pretty obvious even for me :) If you have separate words,
> just tokenize the string and add a plus in front of each of the words.
> But what I'm trying to do here is this:
> 
> Let's say I have a more complicated query, say
> 
> 'george bush "white house"'
> 
> There you have two separate words, "george" and "bush" and then
> "white house" enclosed in quotes. If I use a piece of simple
> tokenization code, the above query becomes
> 
> +georbe +bush +"white +house"
> 
> See what I mean? That won't work the way expected.
> Anyway, I'm still a bit confused the inner workings of Lucene,
> so maybe I'll come up with something myself.
> 
> Jari Aarniala
> [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]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to