Okay attached is the diff file to allow t-shirt to be interpreted as
"t-shirt". Queries that start with a "-" character behave as expected, well
at least as we expected.
For example: -shirt +pants as -shirt +pants
One thing I need to mention is (I dig this from earlier discussion in this
list
+1
- Original Message -
From: "Eric Jain" <[EMAIL PROTECTED]>
To: "Lucene Users List" <[EMAIL PROTECTED]>
Sent: Thursday, July 10, 2003 12:53 PM
Subject: Re: '-' character not interpreted correctly in field names
(solution)
> > I think
> I think this is a fine change, that others would welcome, too.
> No?
> Does your change work with queries that start with a '-' character?
> For example: -shirt +pants
> (note: no space before '-shirt')
>
> If so, I think we could include this change in QueryParser.jj if you
> send the diff, as
s the grammar that it should take all the
> characters
> > > except the ones you specified (the complement).
> > >
> > > Change:
> > > | <#_FIELDNAME_START_CHAR: ( [ " ", "\t", "+", "-", "!", "(",
&
;, ":",
> >
> > To:
> > | <#_FIELDNAME_START_CHAR: ( ~[ " ", "\t", "+", "-", "!", "(", ")", ":",
> >
> > and it should probably work.
> >
> > Eric
> >
>
ot;?" ] >
> >
> > | <#_TERM_START_CHAR: ( ~[ " ", "\t", "+", "-", "!", "(", ")", ":",
> > | "^",
> >
> > "[", "]", "
t;, "-", "!", "(", ")", ":",
To:
| <#_FIELDNAME_START_CHAR: ( ~[ " ", "\t", "+", "-", "!", "(", ")", ":",
and it should probably work.
Eric
-----Original Message-----
From: Victo
so it will match the
> "-" that you are using in your field names (and fix it to match any other
> characters you want to use in field names that it doesn't allow right now).
>
> Eric
>
> -Original Message-
> From: Jon Pipitone [mailto:[EMAIL PROTECTED]
&
On Monday 03 February 2003 07:19, Terry Steichen wrote:
> I believe that the tokenizer treats a dash as a token separator. Hence,
> the only way, as I recall, to eliminate this behavior is to modify
> QueryParser.jj so it doesn't do this. However, doing this can cause some
> other problems, like
o: <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 2:39 AM
Subject: '-' character not interpreted correctly in field names
> Hello!
>
> I have a problem, a big one. I have successfully indexed 600 MB of XML
> data, but the search can't give any results if the
Hello!
I have a problem, a big one. I have successfully indexed 600 MB of XML
data, but the search can't give any results if the field contains any
'-' characters .
For example: compound@cgx-code:[2 - 5] must match at least two results
based on my XML data but it gives nothing.
Can you advice
11 matches
Mail list logo