lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ruchi thakur" <ruchithak...@gmail.com>
Subject Re: search for phrase with specail chars?
Date Mon, 12 Mar 2007 07:24:10 GMT
yes that is exactly what i am doing
in java String i have something like
String aSearchStr = "\"„innere Organe\\\" bezeichnet\"";
Query query = parser.parse(aSearchStr);

2nd line to parse gives me the Exception. In this case as i understand the
search String input that goes to lucene is actually  "„innere Organe\"
bezeichnet"
Should i send something else..
Regards,
Ruchika
On 3/12/07, karl wettin <karl.wettin@gmail.com> wrote:
>
>
> 12 mar 2007 kl. 07.53 skrev ruchi thakur:
>
> > no, i just get the folowing
> > org.apache.lucene.queryParser.ParseException: Lexical error at line 1,
> > column 30. Encountered: <EOF> after : ""
>
> The problem is probably that you have a " in your query, and it
> expects an end "-token. So it needs to be escaped. Programatically:
>
> String q = "\"„innere Organe\\\" bezeichnet\"";
>
> --
> karl
>
> >
> > On 3/12/07, karl wettin <karl.wettin@gmail.com> wrote:
> >>
> >>
> >> 12 mar 2007 kl. 07.44 skrev ruchi thakur:
> >>
> >> > I want to search for phrase     „innere Organe" bezeichnet
> >> > am using query q1  =     "„innere Organe\" bezeichnet"
> >> >
> >> > is there any issue with q1
> >> > am getting Exception in retrieveQuery().IndexDirec:Lexical error at
> >> > line 1,
> >> > column 30. Encountered: <EOF> after : ""
> >>
> >> Is there something more to this exception? Something like what it
> >> expected?
> >>
> >> --
> >> karl
> >> ---------------------------------------------------------------------
> >> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message