That is a good point. I was just thinking that it would be a pain for searchers to have to include the quotes when searching, but I guess there is little way around it. The best you could do is have an option that specified a quoted search...and you might as well make that option be to put the word in quotes :) I don't claim to know much, just trying to help. On the other hand, stripping the quotes would save you two characters of space per quote in the index...ha...

- Mark


Philip Brown wrote:
Thanks, but I don't "think" I need that.  But curious, how will it know it's
a phrase if it's not enclosed in quotes?  Won't all its terms be treated
separately then?

Philip


Mark Miller-5 wrote:
One more tip...if you would like to be able to search phrases without putting in the quotes you must strip them with the analyzer. In standardfilter (in the standard analyzer code) add this:

 private static final String QUOTED_TYPE = tokenImage[QUOTED];
- youll see where to put that

and youll see where to put this:

else if (type == QUOTED_TYPE)  {
return new org.apache.lucene.analysis.Token(text.STRIPMYQUOTESOFFBABY(),t.startOffset(), t.endOffset(), type);
}

text is a string so don't take my pseudo code literally.

- Mark

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






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

Reply via email to