lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Problems while using double quotes
Date Wed, 08 Nov 2006 18:50:30 GMT
: in my search criteria i am using a criteria "apache tomcat" but it is
: giving me a parse exception.

if i understand you correctly, you're saying that when searchQuery is...

	"apache tomcat"

you get a parse error? .. is that by any chance because you are allways
attaching a "*" to the end of searchQuery in the makeWildcardQuery method,
so what you wind up passing to the QueryParser is...

	"apache tomcat"*

... ? ... that's not a legal query string.



:
: my searcher has this piece of code:
:
: searchQuery=makeWildcardQuery(searchQuery);
: masterQuery.add(MultiFieldQueryParser.parse(searchQuery,fields,analyzer),REQUIRED,PROHIBITED);
:
:
:
:
: private String makeWildcardQuery(String query)
:     {
:         String result = query.trim();
:
:         if (0 != result.length())
:         {
:             if (!result.endsWith("*"))
:             {
:                 result = result + "*";
:             }
:         }
:
:         return result;
:     }
:
: Thanks and Regards
: Krishnendra Nandi
: Hewitt Associates India (Pvt.) Ltd.
: Unitech World
: Sector-39, Gurgaon
: Haryana-India
:
: The information contained in this e-mail and any accompanying documents may contain information
that is confidential or otherwise protected from disclosure. If you are not the intended recipient
of this message, or if this message has been addressed to you in error, please immediately
alert the sender by reply e-mail and then delete this message, including any attachments.
Any dissemination, distribution or other use of the contents of this message by anyone other
than the intended recipient
: is strictly prohibited.
:
:
:



-Hoss


---------------------------------------------------------------------
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