lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iker Huerga <iker.hue...@gmail.com>
Subject Re: Issue while searching text with special characters like @,#
Date Tue, 06 Sep 2016 14:17:25 GMT
I'd try scaping the characters as in
https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Escaping%20Special%20Characters

2016-09-06 10:02 GMT-04:00 Chaitanya Kumar Ch <chaitu381923@gmail.com>:

> Hi All!
>
> I am facing issue while trying to match a fields content with some keywords
> which contains symbols like @,#
>
> I have annotated field "body" which is configured as below :
>
> @Field(analyze = Analyze.YES)private String body;
>
> only of the body column content as follows:
>
> Thursday PM Clicks: Jessica Alba; Happy birthday...
> https://t.co/VlZkSF0IUb #johndaly #baby @chaitu @chai @hey
>
> I am trying to search text of body field with below query but it's not
> giving any results:
>
>  +(+body:#johndaly +body:#baby)
>
> "#" symbol is coming in the query only if I add ignoreFieldBridge() to the
> field but I am not getting results.
>
> Below query is generated If i am remove ignoreFieldBridge()
>
> +(+body:johndaly +body:baby)
>
>
> Stack overflow link
> <http://stackoverflow.com/questions/39350676/hibernate-
> search-lucene-search-text-with-special-characters-like>
> --
> Thank You,
> Chaitanya Kumar Ch,
> +91 9550837582
>



-- 
Iker Huerga
http://www.ikerhuerga.com/

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