lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alain Lauzon <alau...@libertefinanciere.com>
Subject RE: Is the searched string 'on' a special case ?
Date Mon, 13 Jan 2003 18:51:35 GMT
At 13:32 2003-01-13 -0500, you wrote:
>Assuming you are using StandardAnalyzer, the default stop words are:
>
>     public static final String[] STOP_WORDS = {
>         "a", "and", "are", "as", "at", "be", "but", "by",
>         "for", "if", "in", "into", "is", "it",
>         "no", "not", "of", "on", "or", "s", "such",
>         "t", "that", "the", "their", "then", "there", "these",
>         "they", "this", "to", "was", "will", "with"
>     };
>
>Your "state" field must not be built with StandardAnalyzer or ON would 
>have been removed by the analyzer when you created the field. It looks 
>like you will need to use lower level APIs than QueryParser to create your 
>Query object or don't use the default stop words.

I am not using the queryParser, but instead a booleanQuery and the state 
field is queried trough a termQuery.  So the StandardAnalyzer should not 
stop the "ON" string because it should not be used on that field by my 
request.  I changed my index building so not to use a "text" document on 
that field, but a "keyword" document instead and nothing has changed, still 
got the 0 results with state:on in my request.

Any other idea ?


>Eric
>
>-----Original Message-----
>From: Alain Lauzon [mailto:alauzon@libertefinanciere.com]
>Sent: Monday, January 13, 2003 1:23 PM
>To: Lucene Users List
>Subject: Is the searched string 'on' a special case ?
>
>
>I have an index wtih many fields, and specially, one for company name and
>one for state.
>
>When I search for :
>+company:"inc"~100
>
>I get 114 results from 2 states, HI (Hawaii) and ON (Ontario).
>
>
>If I search for :
>+state:hi +company:"inc"~100
>
>I get 7 results for Hawaii.
>
>
>But when I search for:
>+state:on +company:"inc"~100
>
>I get no results at all for Ontario.
>
>So what is going on ? I tried with many other states and all are working,
>but not 'on'.
>Is 'on' a special case ? Like on/off ?
>
>Alain Lauzon
>alauzon@libertefinanciere.com
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>
>
>--
>To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message