lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: problem with Whitespace analyzer
Date Sun, 10 Feb 2008 15:47:48 GMT
QueryParser uses special syntax, which can get in the way, for  
operators and grouping, etc.  Parenthesis are part of that special  
syntax, and need to be backslash escaped for QueryParser to skip  
treating them as grouping operators, for example: Ajit_\(Agarkar\)

	Erik



On Feb 10, 2008, at 2:03 AM, saikrishna venkata pendyala wrote:

> Hi,
>
> I am facing a small problem, some one please help me,
>
> I am using Whitespace analyzer, while both indexing and searching  
> the files.
>
> While indexing the analyzer is recognizing <token>Ajit_(Agarkar)</ 
> token>(I
> found it using LUKE) as a single token.
> But while searching{QueryParser parser = new QueryParser(field,  
> analyzer);},
> it is divided into two tokens <token>Ajit_</token>,<token>Agarkar</

> token>.
>
> """
> Enter query:
> Ajit_(Agarkar)
> Searching for: Ajit_ Agarkar
> 0 total matching documents
>
> """
>
>
> --Saikrishna.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message