Hi, 

That's very easy to explain: Regexp queries only work on terms, you already 
said it in your introduction. There is no phrase query in Lucene that accepts 
regular expressions.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]

> -----Original Message-----
> From: Kudrettin Güleryüz [mailto:[email protected]]
> Sent: Saturday, February 13, 2016 7:14 PM
> To: [email protected]
> Subject: Spaces in regular expressions
> 
> Hello,
> 
> I am using standard whitespace analyzer to index a source code document
> using Lucene 5.
> 
> I understand that a document with content foo bar would have only two
> terms: foo and bar.  When I search for "foo bar" it normally matches the
> document. Similarly a regexp query /foo/ or /bar/ also matches the
> document.
> 
> Can you help me understand why doesn't a regexp query like /foo bar/
> doesn't match the document?
> 
> Thank you,
> Kudret


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to