Take a look in the docs for restricted characters. I don't recall for certain, but I believe the ":" is not allowed to be in your search string.
A ":" is normally used when you're indicating what field to search. E.g. SEARCHFIELD:search string You'll find several characters are not allowed... I'd advise you to check in the docs (or even the java lucene docs), there is quite a bit of info about restricted or non-allowed characters. -----Original Message----- From: Giovanni Caputo [mailto:[email protected]] Sent: Tuesday, February 23, 2010 8:31 AM To: [email protected] Subject: Re: text as query of search I don't understand you... I want a list of similary documents of new document. I have seen the text of new document and there are ":" ... this character give problem... But also other caracter, for example "(" can make problem... Ho can resolve this problem?? Thanks Il giorno 23/feb/2010, alle ore 14.10, Heath Aldrich ha scritto: > Sounds like perhaps you passed a colon in as part of your search string. > > Sent from my mobile phone. > Please excuse any spelling or gramatical errors. > > On Feb 23, 2010, at 5:59 AM, "Giovanni Caputo" <[email protected] >> wrote: > >> >> >> Inizio messaggio inoltrato: >> >>> Da: Giovanni Caputo <[email protected]> >>> Data: 23 febbraio 2010 12.54.46 GMT+01.00 >>> A: [email protected], [email protected], [email protected] >>> , [email protected], [email protected] >>> Oggetto: text as query of search >>> >>> Hi, >>> how can i get documents similar to a long text?? >>> >>> I am using lucene.net 2.4 >>> >>> I have tested to use Query query = parser.Parse(ua.TestoCompleto); >>> where ua.TestoCompleto is a String >>> >>> >>> I have created QueryParser parser = new QueryParser(INDEX_PATH, >>> analyzer); >>> as same mode of indexwriter >>> >>> >>> but it generate this exception >>> >>> A first chance exception of type >>> 'Lucene.Net.QueryParsers.ParseException' occurred in Lucene.Net.dll >>> Encountered ":" at line 1, column 0. >>> Was expecting one of: >>> <NOT> ... >>> "+" ... >>> "-" ... >>> "(" ... >>> <QUOTED> ... >>> <TERM> ... >>> <PREFIXTERM> ... >>> <WILDTERM> ... >>> "[" ... >>> "{" ... >>> <NUMBER> ... >>> >>> >> >
