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 Jim Lynch <jw...@sgi.com> on 2005/02/14 18:40:10 UTC
Are wildcard searches supposed to work with fields that are saved,
indexed and not tokenized?
I was trying to write some documentation on how to use the tool and
issued a search for:
contact:DENNIS MORROW
And sure enough I got 647 hits. Then I changed the searc to:
contact:DENNIS MORRO?
And now I get 648 hits, but in some of them the contact doesn't even
remotely resemble the search pattern. For instance here are the what
the contact fields contain for some of these hits:
Contact: GENERIC CONTACT
Contact: Andre Gardinalli
Contact: Brett Morrow (that's especially interesting)
Contact: KEN PATTERSON
And of course there are some with Dennis' name too.
Any idea why this is happening? I'm using the QueryParser.parse method.
Jim.
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Are wildcard searches supposed to work with fields that are saved,
indexed and not tokenized?
Posted by Jim Lynch <jw...@sgi.com>.
Erik Hatcher wrote:
>
> On Feb 14, 2005, at 12:40 PM, Jim Lynch wrote:
>
>> I was trying to write some documentation on how to use the tool and
>> issued a search for:
>>
>> contact:DENNIS MORROW
>
>
> Is that literally the QueryParser string you entered? If so, that
> parses to:
>
> contact:DENNIS OR defaultField:MORROW
>
> most likely.
Ah! Good point.
>
>> And now I get 648 hits, but in some of them the contact doesn't even
>> remotely resemble the search pattern. For instance here are the what
>> the contact fields contain for some of these hits:
>> Contact: GENERIC CONTACT
>> Contact: Andre Gardinalli
>> Contact: Brett Morrow (that's especially interesting)
>> Contact: KEN PATTERSON
>>
>> And of course there are some with Dennis' name too.
>>
>> Any idea why this is happening? I'm using the QueryParser.parse method.
>
>
> I'm not sure you'll be able to do this with QueryParser with spaces in
> an untokenized field. First try it with an API created WildcardQuery
> to be sure it works the way you expect.
I didn't really have any expectations other than what I saw didn't make
sense. I'll just add to the docs that [this set of fields] can't be
searched with wildcards.
Thanks,
Jim.
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Are wildcard searches supposed to work with fields that are saved, indexed and not tokenized?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 14, 2005, at 12:40 PM, Jim Lynch wrote:
> I was trying to write some documentation on how to use the tool and
> issued a search for:
>
> contact:DENNIS MORROW
Is that literally the QueryParser string you entered? If so, that
parses to:
contact:DENNIS OR defaultField:MORROW
most likely.
> And now I get 648 hits, but in some of them the contact doesn't even
> remotely resemble the search pattern. For instance here are the what
> the contact fields contain for some of these hits:
> Contact: GENERIC CONTACT
> Contact: Andre Gardinalli
> Contact: Brett Morrow (that's especially interesting)
> Contact: KEN PATTERSON
>
> And of course there are some with Dennis' name too.
>
> Any idea why this is happening? I'm using the QueryParser.parse
> method.
I'm not sure you'll be able to do this with QueryParser with spaces in
an untokenized field. First try it with an API created WildcardQuery
to be sure it works the way you expect.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org