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 Michael Prichard <mi...@mac.com> on 2006/07/20 04:23:42 UTC

Query does not work past 26 characters?!

Tell me I am totally missing something here....

I created an index w/ StandardAnalyzer with two fields as follows:

Document doc = new Document();
doc.add(new Field("to", "michael@reallylonglonglonglongname.com", Field.Store.YES, Field.Index.TOKENIZED));
doc.add(new Field("content", "blah3 blah3 blah3", Field.Store.YES, Field.Index.TOKENIZED));
writer.addDocument(doc);

When I search for as follows:

PrefixQuery pq = new PrefixQuery(new Term("to", "michael@reallylonglonglong"));

I get a hit. That is good.

When I search a little more like:

PrefixQuery pq = new PrefixQuery(new Term("to", "michael@reallylonglonglongname"));

No hits!!

Same thing with QueryParser, etc.

Any ideas?

Thanks,
Michael

P.S.  I tried UN_TOKENIZED as well...but I don't think that messes with email addresses anyway.

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


Re: Query does not work past 26 characters?!

Posted by Michael Prichard <mi...@mac.com>.
ARRRGH!!! That's it.  Darn, I was half asleep last night when I was experimenting.  I totally feel like a dope.

It works....Thanks!
-Michael
 
On Thursday, July 20, 2006, at 00:36AM, Doron Cohen <DO...@il.ibm.com> wrote:

>> doc.add(new Field("to",
>>      "michael@reallylonglonglonglongname.com",
>> ...
>> PrefixQuery pq = new PrefixQuery(new Term("to",
>>      "michael@reallylonglonglongname"));
>
>Perhaps a typo in the query text -
>   Indexed  text: "michael@reallylonglonglonglongname.com"
>   Searched text: "michael@reallylonglonglongname"
>The searched text is not a prefix of the indexed one.
>
>Regards,
>Doron
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>

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


Re: Query does not work past 26 characters?!

Posted by Doron Cohen <DO...@il.ibm.com>.
> doc.add(new Field("to",
>      "michael@reallylonglonglonglongname.com",
> ...
> PrefixQuery pq = new PrefixQuery(new Term("to",
>      "michael@reallylonglonglongname"));

Perhaps a typo in the query text -
   Indexed  text: "michael@reallylonglonglonglongname.com"
   Searched text: "michael@reallylonglonglongname"
The searched text is not a prefix of the indexed one.

Regards,
Doron


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