This really requires some experimentation, and I encourage all that
are curious to write a little bit of toy code to play with
combinations of analyzers and QueryParser techniques.
On Jul 28, 2005, at 2:07 AM, Alex Kiselevski wrote:
Just to make it clear for me. The last Lucene version supports
interior
+/-.
So, how looks the query that deals with "BOOK NAME" as keyword fields
And I want to find C++ tutorial ?
C++ works just fine, but of course the analyzer is important -
QueryParser won't mess with it though.
A Keyword field with "BOOK NAME" is trickier because of the space.
If you use a KeywordAnalyzer (now found in the contrib/analyzers
codebase) surrounding it with quotes would work I believe.
Let there be no doubt that QueryParser and how it interacts with the
analysis process is fiddly stuff. There are interactions with
special operators, the analyzer, and escaping.
Erik
Thanks in advanvce
Alex Kiselevski
Development Expert, Amdocs Advanced Technologies
+9.729.776.4346 (desk)
+9.729.776.1504 (fax)
AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 28, 2005 3:56 AM
To: java-user@lucene.apache.org
Subject: Re: Regex for legal user search input
What version of Lucene are you using? There was a change that
helped with that situation such that interior +/- was not considered
an operator. That changed is in the 1.4 versions - might you be
running a previous version of Lucene?
Erik
On Jul 27, 2005, at 6:42 PM, Derek Westfall wrote:
Is there a way to allow users to use + and - and special operators in
free-text searches, but also allow them to search for a last name
like
Smith-Jones? (which I'd have to escape?)
Is there a regular expression to determine/fix this kind of user
input
so it is queryparser-legal?
Ie they can't just type * or + in the search box.
How are y'all handling this kind of thing?
Derek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated
recipient(s)
of the message. If the reader of this message is not the intended
recipient,
you are hereby notified that any dissemination, use, distribution
or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us
immediately
by replying to the message and deleting it from your computer.
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]