You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Brian Campbell <be...@hotmail.com> on 2003/08/28 22:45:11 UTC

Keyword search with space and wildcard

I've created and index that has a Keyword field in it.  I'm trying to do a 
search on that field where my term has a space and the wildcard character in 
it.  For example, I'll issue the following search:  project_name:"Hello w*". 
  I have an entry in the project_name field of "Hello world".  I would 
expect to get a hit on this but I don't.  Is this not the way Lucene 
behaves? Am I doing something wrong?  Thanks.

-Brian

_________________________________________________________________
Help protect your PC: Get a free online virus scan at McAfee.com. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


Re: Keyword search with space and wildcard

Posted by Terry Steichen <te...@net-frame.com>.
If I understand your issue correctly, I think what you're experiencing is
the fact that you can have a phrase query "hello world", or a wildcard query
+hell* +wor*, but you can't mix the two together.  As far as I've found,
that's a basic limitation you just have to live with.  (Of course, if
someone on the list can show me where I'm wrong, I'll be delighted.)  You
can add boosting to any kind of term (such as wor*^10 or "world order"^10),
but (I don't think) you can't mix wildcards and phrases.

HTH,

Terry

----- Original Message -----
From: "Brian Campbell" <be...@hotmail.com>
To: <lu...@jakarta.apache.org>
Sent: Thursday, August 28, 2003 4:45 PM
Subject: Keyword search with space and wildcard


> I've created and index that has a Keyword field in it.  I'm trying to do a
> search on that field where my term has a space and the wildcard character
in
> it.  For example, I'll issue the following search:  project_name:"Hello
w*".
>   I have an entry in the project_name field of "Hello world".  I would
> expect to get a hit on this but I don't.  Is this not the way Lucene
> behaves? Am I doing something wrong?  Thanks.
>
> -Brian
>
> _________________________________________________________________
> Help protect your PC: Get a free online virus scan at McAfee.com.
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


Re: Keyword search with space and wildcard

Posted by Joe Paulsen <jo...@verizon.net>.
Brian,

This seems akin to the Phrase Searching problem that I encountered (haven't
heard anything back from my posting yet) - which goes as follows:  I try to
do the phrase search "center* form" but the system seems to simply ignore
the wildcard (throws it away) when processing the search - so I get only
results for "center form".  My guess is the parser is processing your search
simply as if it were "hello w".

I've got no solution - was hoping to hear something from the list.

Joe

----- Original Message ----- 
From: "Brian Campbell" <be...@hotmail.com>
To: <lu...@jakarta.apache.org>
Sent: Thursday, August 28, 2003 4:45 PM
Subject: Keyword search with space and wildcard


> I've created and index that has a Keyword field in it.  I'm trying to do a
> search on that field where my term has a space and the wildcard character
in
> it.  For example, I'll issue the following search:  project_name:"Hello
w*".
>   I have an entry in the project_name field of "Hello world".  I would
> expect to get a hit on this but I don't.  Is this not the way Lucene
> behaves? Am I doing something wrong?  Thanks.
>
> -Brian
>
> _________________________________________________________________
> Help protect your PC: Get a free online virus scan at McAfee.com.
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>